openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1778654 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
Date Fri, 13 Jan 2017 18:58:02 GMT
Author: rmannibucau
Date: Fri Jan 13 18:58:02 2017
New Revision: 1778654

URL: http://svn.apache.org/viewvc?rev=1778654&view=rev
Log:
MEECROWAVE-3 jsaper support OOTB

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java?rev=1778654&r1=1778653&r2=1778654&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/TomcatAutoInitializer.java
Fri Jan 13 18:58:02 2017
@@ -40,5 +40,19 @@ public class TomcatAutoInitializer imple
         def.setInitParameter("debug", "0");
         def.setLoadOnStartup(1);
         def.addMapping("/");
+
+        try {
+            final String jsp = "org.apache.jasper.servlet.JspServlet";
+            TomcatAutoInitializer.class.getClassLoader().loadClass(jsp);
+            final ServletRegistration.Dynamic jspDef = ctx.addServlet("default", jsp);
+            jspDef.setInitParameter("fork", "false");
+            jspDef.setInitParameter("xpoweredBy", "false");
+            jspDef.setInitParameter("development", "false");
+            jspDef.setLoadOnStartup(3);
+            def.addMapping("*.jsp");
+            def.addMapping("*.jspx");
+        } catch (final NoClassDefFoundError | ClassNotFoundException e) {
+            // not there, skip
+        }
     }
 }



Mime
View raw message