tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: tomee.jsp-development should support all servlets and not only jsp one
Date Sun, 09 Nov 2014 21:37:10 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x dfd13e80e -> c4944e187


tomee.jsp-development should support all servlets and not only jsp one


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/c4944e18
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/c4944e18
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/c4944e18

Branch: refs/heads/tomee-1.7.x
Commit: c4944e187ccc733f7cd9797c99f8acc865941618
Parents: dfd13e8
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Sun Nov 9 21:36:43 2014 +0000
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Sun Nov 9 21:36:43 2014 +0000

----------------------------------------------------------------------
 .../org/apache/tomee/catalina/OpenEJBContextConfig.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c4944e18/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
index 394eba0..cf617b0 100644
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/OpenEJBContextConfig.java
@@ -369,6 +369,17 @@ public class OpenEJBContextConfig extends ContextConfig {
             return;
         }
 
+        if ("true".equalsIgnoreCase(SystemInstance.get().getProperty("tomee.jsp-development",
"true"))) {
+            for (final Container c : context.findChildren()) {
+                if (Wrapper.class.isInstance(c)) {
+                    final Wrapper servlet = Wrapper.class.cast(c);
+                    if ("org.apache.jasper.servlet.JspServlet".equals(servlet.getServletClass()))
{
+                        servlet.addInitParameter("development", "true");
+                    }
+                }
+            }
+        }
+
         final ClassLoader classLoader = context.getLoader().getClassLoader();
 
         // add myfaces auto-initializer if mojarra is not present


Mime
View raw message