branch develop updated (04536ee -> 9d05927)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository nuiton-web. See http://git.nuiton.org/nuiton-web.git from 04536ee fixes #3782: Update to jetty 9 new 9d05927 Fixes two runtime error in embedded mode The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 9d0592737597f277561fdf67eecfa541c12f0262 Author: Eric Chatellier <eric.chatellier@gmail.com> Date: Sat Nov 14 12:23:12 2015 +0100 Fixes two runtime error in embedded mode Summary of changes: nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-web. See http://git.nuiton.org/nuiton-web.git commit 9d0592737597f277561fdf67eecfa541c12f0262 Author: Eric Chatellier <eric.chatellier@gmail.com> Date: Sat Nov 14 12:23:12 2015 +0100 Fixes two runtime error in embedded mode --- nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java b/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java index 6b641a1..cbc171b 100644 --- a/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java +++ b/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java @@ -43,8 +43,12 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import javax.servlet.jsp.JspFactory; import javax.swing.ImageIcon; +import org.apache.jasper.runtime.JspFactoryImpl; +import org.apache.tomcat.InstanceManager; +import org.apache.tomcat.SimpleInstanceManager; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; @@ -182,6 +186,12 @@ public class JettyLauncher implements ActionListener, MouseListener { WebAppContext webappcontext = new WebAppContext(); webappcontext.setContextPath(contextPath); webappcontext.setWar(me.getAbsolutePath()); + + // fixes java.lang.IllegalStateException: No org.apache.tomcat.InstanceManager set in ServletContext + webappcontext.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager()); + + // fixes NPE due to getDefaultFactory() returning null + JspFactory.setDefaultFactory(new JspFactoryImpl()); HandlerCollection handlers = new HandlerCollection(); handlers.setHandlers(new Handler[]{webappcontext, new DefaultHandler()}); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm