This is not so much a Jetty question as a general Java Webapp question. If you plan to serve them directly (e.g. * .css, * .css, images, etc.), put them somewhere above WEB-INF
, but below your docroot. Java WebApps are the following basic directory structure.
<docroot> +WEB-INF/ +lib/ +classes/
Everything in <docroot>
is available directly via http. There is nothing WEB-INF
and below. A really simple webapp with one page (index.jsp), one image in the image directory and its configuration file (web.xml) will look like this.
index.jsp images/bob.jpg WEB-INF/ web.xml lib/ classes/
In index.jsp you can refer to bob.jpg as ...
<img src="images/bob.jpg"/>
source share