geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1100865 - /geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Date Mon, 09 May 2011 02:48:08 GMT
Author: violalu
Date: Mon May  9 02:48:07 2011
New Revision: 1100865

URL: http://svn.apache.org/viewvc?rev=1100865&view=rev
Log:
GERONIMO-5949 The containers must inform the developer with a
descriptive error message when the deployment descriptor contains more than
one element of session-config, and login-config.

Modified:
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?rev=1100865&r1=1100864&r2=1100865&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Mon May  9 02:48:07 2011
@@ -71,6 +71,8 @@ import org.apache.openejb.jee.Tag;
 import org.apache.openejb.jee.Taglib;
 import org.apache.openejb.jee.TldTaglib;
 import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.LoginConfig;
+import org.apache.openejb.jee.SessionConfig;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.Bundle;
@@ -194,6 +196,20 @@ public class JspModuleBuilderExtension i
                     WebAppInfoBuilder.normalizeUrlPatterns(propertyGroup.getUrlPattern(),
jspMappings);
                 }
             }
+
+            
+            //login-config element
+            List<LoginConfig> loginConfigs = webApp.getLoginConfig();
+            if (loginConfigs.size() > 1) {
+                throw new DeploymentException("Web app " + module.getName() + " cannot have
more than one login-config element.  Currently has " + loginConfigs.size() + " login-config
elements.");
+            }
+            
+           //session-config element
+            List<SessionConfig> sessionConfigs = webApp.getSessionConfig();
+            if (sessionConfigs.size() > 1) {
+                throw new DeploymentException("Web app " + module.getName() + " cannot have
more than one sesion-config element.  Currently has " + sessionConfigs.size() + " session-config
elements.");
+            }            
+            
             jspServlet.servletMappings.addAll(jspMappings);
             for (ServletInfo servletInfo: webAppInfo.servlets) {
                 servletInfo.servletMappings.removeAll(jspMappings);



Mime
View raw message