• Increase font size
  • Default font size
  • Decrease font size

Create your web application

Creating web applications

  1. Download the Jetty Web Server
  2. Uncompress it
  3. Put your service inside the webapps directory ($JETTY_HOME/webapps). As you can use CoDeS to serve your service files, this can be an empty folder (its name must be the service name). The next main step teaches you how to put your service files on CoDeS.
  4. Next step is how to configure your application.

Configuring web applications

In addition we need to specify a context for this application, this context can just be a path where to be deployed. i.e.

foo.war will be deployed at www.mymachine.com/myweb

To do that we need to create a new xml file named as the file we have in $JETTY_HOME/webapps (foo.xml in the upward example) and save it inside the $JETTY_HOME/contexts directory.

A basic context xml is something as simple as this:

The black bold text is what we need to change. The first one is the path where our application will be deployed when we type the web address in our web browser.

The second field is where our application is physically located from the root of the Jetty server.>

Download a template of this xml from here.

Finally, re-compress the server from its root as ServiceJetty.zip