Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Example of creating webapp in XML

Maybe looking at the embedded code examples for jetty-9 will help, as the xml <-> code is pretty straightforward. Here's a single webapp deployed to a server:

And the xml reference for jetty-9:

The jetty-9 docs are a work in progress so check back frequently for updates.


On 15 November 2012 07:41, ccleve <> wrote:
I need to configure a webapp, and would like to do it using a jetty xml configuration file.

The normal way to do it is to have a webapps directory that gets scanned for WEB-INF/web.xml, but that turns out to be inconvenient for this particular application. Also, I think I know how to do it programmatically, but I'm really trying to keep all configuration in XML so it can be modified by my customers.

The old XML that handles contexts doesn't work in Jetty 9 any more.

My guess is that I have to create a org.eclipse.jetty.webapp.WebAppContext, register a servlet with it, and somehow apply it to the Server, but the magic syntax eludes me.

Does anyone have an example?

jetty-users mailing list

Jan Bartel <janb@xxxxxxxxxxx> – Developer advice, services and support
from the Jetty & CometD experts.

Back to the top