Hi, I currently have two jetty.xml file, one for prod, one for dev.
The jetty.xml file for prod is quite simple. It configure a WebAppContext like this : <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" " http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/workable-web/target/workable.war</Set> <Call name="setAttribute"> <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg> <Arg>.*/.*langur[^/]*\.jar$</Arg> </Call> </Configure> This configuration allows to avoid scanning the whole classpath for JEE annotations. In dev, I have a basic configuration file to enable https but I am unable to backport the previous configuration. So I scan the whole classpath and startup is very time consuming. The dev file : <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" " http://www.eclipse.org/jetty/configure_9_0.dtd"> <Configure id="jetty" class="org.eclipse.jetty.server.Server"> <New id="httpsConfig" class="org.eclipse.jetty.server.HttpConfiguration"> <Set name="secureScheme">https</Set> <Set name="securePort">8443</Set> <Set name="outputBufferSize">32768</Set> <Call name="addCustomizer"> <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg> </Call> </New> <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> <Set name="secureScheme">https</Set> <Set name="securePort">8443</Set> <Set name="outputBufferSize">32768</Set> <!-- Uncomment to enable handling of X-Forwarded- style headers--> <Call name="addCustomizer"> <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg> </Call> </New> <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory"> <Set name="KeyStorePath">./workable-web/ssl/keystore</Set> <Set name="KeyStorePassword">hopwork1234</Set> <Set name="KeyManagerPassword">hopwork1234</Set> </New> <New id="sslConnector" class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"><Ref refid="jetty" /></Arg> <Arg name="factories"> <Array type="org.eclipse.jetty.server.ConnectionFactory"> <Item><New class="org.eclipse.jetty.server.SslConnectionFactory"> <Arg name="sslContextFactory"><Ref refid="sslContextFactory" /></Arg> <Arg name="next">http/1.1</Arg> </New></Item> <Item> <New class="org.eclipse.jetty.server.HttpConnectionFactory"> <Arg name="config"><Ref refid="httpsConfig" /></Arg> </New> </Item> </Array> </Arg> <Set name="port">8443</Set> <Set name="idleTimeout">30000</Set> </New> <Call name="addConnector"> <Arg><Ref refid="sslConnector" /></Arg> </Call> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"><Ref refid="jetty" /></Arg> <Arg name="factories"> <Array type="org.eclipse.jetty.server.ConnectionFactory"> <Item> <New class="org.eclipse.jetty.server.HttpConnectionFactory"> <Arg name="config"><Ref refid="httpConfig" /></Arg> </New> </Item> </Array> </Arg> <Set name="port"><Property name="jetty.port" default="8088" /></Set> <Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set> </New> </Arg> </Call> </Configure> I don't understand in the documentation how to combine the configuration of a webapp context and the configuration of a server Any idea ?
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
