Your <!DOCTYPE> is invalid. And you cannot modify the handler list of a WebAppContext from within a WebAppContext's WEB-INF/jetty-web.xml (its too late in the process)
Use the technique and DOCTYPE in my prior reply. -- Joakim Erdfelt <[email protected]> webtide.com <http://www.webtide.com/> - intalio.com/jetty Expert advice, services and support from from the Jetty & CometD experts eclipse.org/jetty - cometd.org On Tue, Apr 15, 2014 at 5:49 AM, Thomas Scheffler < [email protected]> wrote: > Am 11.02.2014 09:01, schrieb Thomas Scheffler: > > Hi, >> >> I have a single webapp that should only be accessible by request from >> localhost (ipv4/ipv6). I am looking for a way to configure it in >> WEB-INF/jetty-web.xml >> I provide a file (META-INF/context.xml) for Tomcat, that looks like this: >> >> <Context> >> <Valve className="org.apache.catalina.valves.RemoteAddrValve" >> allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> >> </Context> >> >> Yet I was not successful achieving the same with jetty 9.1. Any help is >> highly appreciated. >> > > I found this solution in the deep of the web: > > <!DOCTYPE Configure PUBLIC > "-//Mort Bay Consulting//DTD Configure//EN" > > "http://www.eclipse.org/jetty/configure_9_0.dtd"> > <Configure class="org.eclipse.jetty.webapp.WebAppContext"> > <Set name="handler"> > <New class="org.eclipse.jetty.server.handler.IPAccessHandler"> > <Call name="addWhite"> > <Arg>127.0.0.1</Arg> > </Call> > <Set name="handler"> > <!-- here's where you put what was there before: --> > <New id="Contexts" > class="org.eclipse.jetty.server.handler.ContextHandlerCollection" > /> > </Set> > </New> > </Set> > </Configure> > > It does something but sadly even forbids access from localhost. Any ideas? > > kind regards, > > Thomas > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
