Changeset 15915afe


Ignore:
Timestamp:
Mar 3, 2017 5:56:47 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ec6c244
Parents:
b72085bc
Message:

Remove dup DTDs in javax.servlet.jar
Set InstanceManager? for webapps
Remove InstanceManager? log message
Resolves ticket #1818

Location:
apps
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    rb72085bc r15915afe  
    182182            <zipfileset includes="javax/**/*" src="${jetty.base}/lib/apache-jsp/org.mortbay.jasper.apache-jsp-8.0.33.jar"/>
    183183            <!-- In Debian packages they are found in /usr/share/java/tomcat8-servlet-api.jar in the libtomcat8-java package -->
    184             <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/jetty-schemas-3.1.jar" />
     184            <!-- javax/servlet/jsp/resources are dups of those in apache-jsp jar -->
     185            <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties javax/servlet/jsp/resources/*" src="${jetty.base}/lib/jetty-schemas-3.1.jar" />
    185186        </jar>
    186187      <!--
  • apps/routerconsole/java/build.xml

    rb72085bc r15915afe  
    7171                <pathelement location="../../jetty/jettylib/jetty-webapp.jar" />
    7272                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
     73                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    7374                <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
    7475                <pathelement location="../../systray/java/build/systray.jar" />
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    rb72085bc r15915afe  
    4141import net.i2p.util.SystemVersion;
    4242
     43import org.apache.tomcat.SimpleInstanceManager;
    4344import org.eclipse.jetty.security.HashLoginService;
    4445import org.eclipse.jetty.security.ConstraintMapping;
     
    632633                                                       (_listenPort != null ? _listenPort : _sslListenPort));
    633634            tmpdir.mkdir();
    634             if (!SystemVersion.isWindows() && !SystemVersion.isMac() &&
    635                 _context.getBaseDir().getAbsolutePath().equals("/usr/share/i2p")) {
    636                // We are using Tomcat 6, so the Debian patch doesn't apply.
    637                // Remove when we switch to Tomcat 8
    638                _context.logManager().getLog(Server.class).logAlways(net.i2p.util.Log.INFO, "Please ignore any InstanceManager warnings");
    639             }
    640635            rootServletHandler = new ServletHandler();
    641636            rootWebApp = new LocaleWebAppHandler(_context,
     
    668663            // start does a mapContexts()
    669664            _server.start();
     665            // can't do this before start
     666            // http://stackoverflow.com/questions/17529936/issues-while-using-jetty-embedded-to-handle-jsp-jasperexception-unable-to-com
     667            // https://github.com/jetty-project/embedded-jetty-jsp/blob/master/src/main/java/org/eclipse/jetty/demo/Main.java
     668            rootServletHandler.getServletContext().setAttribute("org.apache.tomcat.InstanceManager", new SimpleInstanceManager());
    670669        } catch (Throwable me) {
    671670            // NoClassFoundDefError from a webapp is a throwable, not an exception
  • apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java

    rb72085bc r15915afe  
    1111import net.i2p.util.SecureDirectory;
    1212
     13import org.apache.tomcat.SimpleInstanceManager;
    1314import org.eclipse.jetty.server.Handler;
    1415import org.eclipse.jetty.server.Server;
     
    6465         wac.setThrowUnavailableOnStartupException(true);
    6566         wac.start();
     67         // can't do this before start
     68         // do we just need one, in the ContextHandlerCollection, or one for each?
     69         // http://stackoverflow.com/questions/17529936/issues-while-using-jetty-embedded-to-handle-jsp-jasperexception-unable-to-com
     70         // https://github.com/jetty-project/embedded-jetty-jsp/blob/master/src/main/java/org/eclipse/jetty/demo/Main.java
     71         wac.getServletContext().setAttribute("org.apache.tomcat.InstanceManager", new SimpleInstanceManager());
    6672    }
    6773
Note: See TracChangeset for help on using the changeset viewer.