Categories
Java Television Web Development WebSphere

Deploying a web application to Jetty

The Jetty web application server is great. It is just not very well document and when it is documented it is aimed for the very uninitiated. If you’re using Jetty, it is almost like an old boys club – ‘you made it’.

Still, it appears that Jetty and Tomcat are becoming much more similar in their way of doing things, with both using a somewhat proprietary, if you can say that on an open source project, configuration schemes. So how do you deploy a web application to Jetty?

Share
Categories
Java

Working with Jetty

For my thesis, I am going to use the Jetty lightweight web server and as such am going to need a lot of trying and learning around how to use it, as it is more ’embedded’, for lack of a better word, than Tomcat. For me, Tomcat is a relatively known entity, having worked with in one form or another since 2000.

I am using Jetty 6.1.7,

So here goes…

Lesson #1: Setting Jetty’s default Port

  1. Open the file jetty.xml under the /etc folder inside the Jetty installation directory.
  2. Inside of the element with the name "addConnector", look for the element
    <Set name="port"><SystemProperty name="jetty.port" default="8999"/></Set>
  3. Change the value of the default attribute to the port you want to use.

del.icio.us Tags: ,,
Share
Categories
Java Web Development WebSphere

RAD 7 – (Small) SNAFU Number Two (with solution)

Class diagrams are great. RAD 7 has them and it generates and updates code based on them. Lovely.
The forward and reverse engineering capabilities, the works.
Now if you refactor the classes and change package names… then you’re in trouble. The class diagram is like, oblivious to the change and being unable to find the classes the diagram is based on it just chokes. So just be aware of this possible problem.

How to fix this:

  1. Open the dnx class file with RAD’s XML editor.
  2. Search for the term “srcfolder” – this is where the diagram looks for your source code
  3. Do a replace all for the value srcfolder is set to – e.g. srcfolder=src%5B (the %5B stands for the URL encoded ‘]’ character – and set the replacement value to the new refactored package name – e.g. srcfolder=src/java%5B

Now open the diagram again using the DNX file viewer and voila – your diagram is back!

Share
Share