[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-dev] Servlet Initialization in Jetty 9.0.2
|
On 2013-05-16 23:07:18 +0000, Jan Bartel said:
Can you post the code that sets up the servlets? There were some
changes to jetty-9 about how the holders are started, but I wouldn't
have thought it could affect you, but if you post the code, then I'll
have a better idea.
It's here:
http://git.eclipse.org/c/gyrex/gyrex-platform.git/tree/bundles/org.eclipse.gyrex.http.jetty/src/org/eclipse/gyrex/http/jetty/internal/app/ApplicationContext.java
Starting at line 304.
// create holder
final ServletHolder holder = new ServletHolder(servletClass);
if (null != initparams) {
holder.setInitParameters(initparams);
}
// register servlet
applicationHandler.getServletHandler().addServletWithMapping(holder, pathSpec);
With Jetty 8 I had to do the following as well, because Jetty did not
start the holders when the handler was already started.
if (applicationHandler.getServletHandler().isStarted() ||
applicationHandler.getServletHandler().isStarting()) {
try {
holder.start();
} catch (final Exception e) {
…
}
-Gunnar
--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx