The warning will be coming from the webdefault.xml file, which is applied to all webapps. If you don't specify an explicit webdefault.xml, then we apply the one that is baked into the jetty-webapp.jar. The webdefault.xml saves the webapp from having to set up a lot of housekeeping stuff, one of which is the definition of the JSP servlet. You can modify the one that is in $jetty.home/etc/webdefault.xml and then apply it to your webapp. Here's a link to the doco page on that: http://www.eclipse.org/jetty/documentation/current/webdefault-xml.html
Alternatively, as Greg says, if you don't really need all the webapp machinery, you can just deploy a simple ContextHandler to deal with static content. Here's a link to the doco page on that: http://www.eclipse.org/jetty/documentation/current/static-content-deployment.html Jan On 28 June 2016 at 21:11, Alexander Farber <[email protected]> wrote: > Hello, > > to serve a static (only HTML files and images) virtual host I have created > the following /var/www/jetty-base/webapps/afarber.de.xml file: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" " > http://www.eclipse.org/jetty/configure_9_0.dtd"> > > <Configure class="org.eclipse.jetty.webapp.WebAppContext"> > <New id="root" class="java.lang.String"> > <Arg>/var/www/html/afarber.de</Arg> > </New> > > <Set name="contextPath">/</Set> > <Set name="virtualHosts"> > <Array type="java.lang.String"> > <Item>afarber.de</Item> > <Item>www.afarber.de</Item> > </Array> > </Set> > <Set name="resourceBase"><Ref refid="root" /></Set> > <Set name="welcomeFiles"> > <Array type="string"> > <Item>index.html</Item> > <Item>index.php</Item> > </Array> > </Set> > </Configure> > > And it works well, but prints a warning at the start-up: > > INFO::main: Logging initialized @196ms > INFO:oejs.Server:main: jetty-9.3.10.v20160621 > INFO:oejdp.ScanningAppProvider:main: Deployment monitor > [file:///var/www/jetty-base/webapps/] at interval 1 > INFO:oejsh.ContextHandler:main: Started > o.e.j.s.ServletContextHandler@2b98378d{/,file:///var/www/html/ > slova.de/,AVAILABLE,slova.de} > INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /, did not > find org.eclipse.jetty.jsp.JettyJspServlet > INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@57536d79 > {/,file:///var/www/html/afarber.de/,AVAILABLE,afarber.de} > INFO:oejs.AbstractConnector:main: Started > ServerConnector@fcd6521{proxy,[proxy, > http/1.1]}{0.0.0.0:8080} > INFO:oejs.Server:main: Started @495ms > > I am not planning to use JSP, is there please a way to silence this > warning? > > Do I have to specify a different handler for WebAppContext and how to do > it in XML? > > Thank you > Alex > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > -- Jan Bartel <[email protected]> www.webtide.com *Expert assistance from the creators of Jetty and CometD*
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
