geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r892150 - in /geronimo/server/trunk/plugins: jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java jasper/jasper/src/main/plan/plan.xml tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
Date Fri, 18 Dec 2009 06:18:19 GMT
Author: xuhaihong
Date: Fri Dec 18 06:18:11 2009
New Revision: 892150

URL: http://svn.apache.org/viewvc?rev=892150&view=rev
Log:
Use a JasperJSPFactoryConfigurer GBean to set JSPFactoryImpl

Added:
    geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
  (with props)
Modified:
    geronimo/server/trunk/plugins/jasper/jasper/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml

Added: geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java?rev=892150&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
(added)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
Fri Dec 18 06:18:11 2009
@@ -0,0 +1,53 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.jasper;
+
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 
+ * @version $Rev$ $Date$
+ */
+@GBean
+public class JasperJSPFactoryConfigurer implements GBeanLifecycle {
+
+    private static final Logger logger = LoggerFactory.getLogger(JasperJSPFactoryConfigurer.class);
+
+    @Override
+    public void doFail() {
+    }
+
+    @Override
+    public void doStart() throws Exception {
+        try {
+            // Set JSP factory
+            Class.forName("org.apache.jasper.compiler.JspRuntimeContext");
+        } catch (Throwable t) {
+            logger.warn("Couldn't initialize Jasper", t);
+        }
+    }
+
+    @Override
+    public void doStop() throws Exception {
+        //TODO How to un-set it ?
+        //JspFactory.setDefaultFactory(null);        
+    }
+}
\ No newline at end of file

Propchange: geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperJSPFactoryConfigurer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/jasper/jasper/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/jasper/src/main/plan/plan.xml?rev=892150&r1=892149&r2=892150&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/jasper/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/jasper/jasper/src/main/plan/plan.xml Fri Dec 18 06:18:11
2009
@@ -22,4 +22,7 @@
   <gbean name="JasperSystemProperties" class="org.apache.geronimo.system.properties.SystemProperties">
     <attribute name="systemProperties">org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS=true</attribute>
   </gbean>
-</module>
+
+    <gbean name="JasperJSPFactoryConfigurer" class="org.apache.geronimo.jasper.JasperJSPFactoryConfigurer">
+    </gbean>
+</module>
\ No newline at end of file

Modified: geronimo/server/trunk/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml?rev=892150&r1=892149&r2=892150&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
(original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat7/src/main/filtered-resources/tomcat-base/server.xml
Fri Dec 18 06:18:11 2009
@@ -25,12 +25,9 @@
 <Server port="8005" shutdown="SHUTDOWN">
 
     <!--APR library loader. Documentation at /docs/apr.html -->
-    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
-    <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
-->
-    <Listener className="org.apache.catalina.core.JasperListener"/>
+    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
   
     <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
     <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
-    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
 
     <!-- 
         Geronimo uses its own JNDI implementation, globalNamingResources configurations in



Mime
View raw message