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:
zzz
2017-03-03 15:48:10 +00:00
parent d3abbe86e9
commit b72085bcf3
45 changed files with 511 additions and 426 deletions

View File

@ -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);