forked from I2P_Developers/i2p.i2p
Debian builds:
- Remove with-libtomcat6-java and with-libtomcat7-java - Replace with-libjetty8-java with-libjetty9-java - Add libtomcat8-java dependency in debian builds - Change libservlet-3.0-java implicit dependency to libservlet-3.1-java - Initial mods for trusty build files, as it does not have jetty 9 - Initial xenial build files - Add link to jetty9-apache-jsp.jar - Add necessary util jars to jsp classpath Non-Debian builds: - Move tomcat runtime from javax.servlet.jar to jasper-runtime.jar, to be consistent with Jetty 8 - Switch from jetty (glassfish) to apache (tomcat) jsp implementation, to be consistent with Debian builds - Drop checked-in Tomcat 6 and Jetty 8 jars Code: - Force Jasper initialization in RouterConsoleRunner since we don't use the Jetty annotation scanner
This commit is contained in:
@ -641,6 +641,18 @@ public class RouterConsoleRunner implements RouterApp {
|
||||
rootWebApp = new LocaleWebAppHandler(_context,
|
||||
"/", _webAppsDir + ROUTERCONSOLE + ".war",
|
||||
tmpdir, rootServletHandler);
|
||||
try {
|
||||
// Not sure who is supposed to call this, but unless we do,
|
||||
// all the jsps die NPE, because JspFactory.getDefaultContext() returns null.
|
||||
// We probably have to do this because we don't bundle the Jetty annotations jar and scanner.
|
||||
// This is only with Tomcat 8, not with the Jetty (Eclipse) jsp impl.
|
||||
// Got a clue from this ancient post for Tomcat 6:
|
||||
// https://bz.apache.org/bugzilla/show_bug.cgi?id=39804
|
||||
// see also apps/jetty/build.xml
|
||||
Class.forName("org.eclipse.jetty.apache.jsp.JettyJasperInitializer");
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
System.err.println("Warning: JettyJasperInitializer not found");
|
||||
}
|
||||
initialize(_context, (WebAppContext)(rootWebApp.getHandler()));
|
||||
chColl.addHandler(rootWebApp);
|
||||
|
||||
|
Reference in New Issue
Block a user