[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Customizing 404 response for virtual hosts
|
On 06/08/2015 15:07, Joakim Erdfelt wrote:
Wait, you are managing the setHandler's yourself?
You are not using the deploy module in the distribution?
Almost sounds like you are using embedded-jetty techniques.
Is this the case?
No, it started off as a traditional servlet webapp running under Tomcat,
then I moved to Jetty 7, and now Jetty 8, with everything configured in
a jetty.xml:
<Configure id="HttpsServer" class="org.eclipse.jetty.server.Server">
<Set name="GracefulShutdown">1000</Set>
<Set name="StopAtShutdown">true</Set>
<New id="ServerLog" class="java.io.PrintStream">
...
</New>
<Call class="java.lang.System" name="setErr">
<Arg>
<Ref id="ServerLog"/>
</Arg>
</Call>
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
...
</New>
</Arg>
</Call>
<Call name="setHandler">
<Arg>
<New class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="Descriptor">
<Property name="jetty.home" default="."
/>/webapps/default/WEB-INF/web.xml
</Set>
<Set name="ResourceBase">
<Property name="jetty.home" default="." />/webapps/default
</Set>
<Set name="ContextPath">/</Set>
<Set name="virtualHosts">
...
</Set>
<Set name="Handler">
<New class="org.eclipse.jetty.server.handler.RequestLogHandler">
...
</New>
</Arg>
</Call>
</Configure>
Is there perhaps an easy way to do what I want if I upgrade to Jetty 9
(which I'm currently considering)?
--
John English