aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Hello world not working on Jetty server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Hello world not working on Jetty server" Watch "Hello world not working on Jetty server" New topic
Author

Hello world not working on Jetty server

Melanie Smith
Greenhorn

Joined: Oct 05, 2005
Posts: 2

I'm relative new to Java and I'm having trouble deploying a simple app to a server.

A brief history:

I've made a small hello world app that has a MySql back end that saves a message the user types in.

I've used:
Java 5
Wicket framework
Hibernate
MySQL

Right now, I am using embedded Jetty 6 as a web server. I'd like to deploy the app to a standalon Jetty instance on a
server I've configured on a VMWare host.

Server:
Ubuntu Jaunty Jackalope
MySQL
Java 5
Jetty 5

I'm currently modifying the default jetty.xml (that comes with installation). In the context section, I've pointed my app
folder in the webapps directory (usr/share/jetty/webapps/hellworld).

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add a all web application within the webapps directory. -->
<!-- + No virtual host specified -->
<!-- + Look in the webapps directory relative to jetty.home or . -->
<!-- + Use the webdefault.xml resource for the defaults descriptor -->
<!-- + Upack the war file -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="rootWebApp">helloworld</Set>
<Call name="addWebApplications">
<Arg></Arg>
<Arg><SystemProperty name="jetty.home" default="."/>/webapps/</Arg>
<Arg>org/mortbay/jetty/servlet/webdefault.xml</Arg>
<Arg type="boolean">false</Arg>
</Call>

After deploying the war file onto the server in the helloworld directory, when trying to access it, I'm only seeing a list of the helloworld directory contents.

Would someone have any ideas if I'm missing any configuration, or what I could do to resovle this issue?
Do I need to change anything in the code for it to work with a standalone server (as opposed to its current embedded instance)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Hello world not working on Jetty server
 
Similar Threads
Why no translation error when "<scripting-invalid>true</scripting-invalid>" and scripting anyway?
How do I make a war file?
sample struts helloworld not working on eclipse
Integrating Jett6 with Jboss
HTTP Status 404 servlet error ("The requested resource is not available")