geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r999688 - in /geronimo/server/trunk/plugins/tomcat: geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/ geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/ geronimo-tomcat7/src/main/java/o...
Date Tue, 21 Sep 2010 23:43:09 GMT
Author: djencks
Date: Tue Sep 21 23:43:08 2010
New Revision: 999688

URL: http://svn.apache.org/viewvc?rev=999688&view=rev
Log:
GERONIMO-5624 use info tree for tomcat web app deployment

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/EjbWsContextConfig.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/WebContextConfig.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/listener/DispatchListener.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/ApplicationTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JAASSecurityTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JACCSecurityTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/StatTest.java
    geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/pom.xml
    geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Tue Sep 21 23:43:08 2010
@@ -84,7 +84,12 @@ import org.apache.geronimo.tomcat.cluste
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.web.WebAttributeName;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
+import org.apache.geronimo.web25.deployment.StandardWebAppInfoFactory;
+import org.apache.geronimo.web25.deployment.WebAppInfoBuilder;
+import org.apache.geronimo.web25.deployment.WebAppInfoFactory;
 import org.apache.geronimo.web25.deployment.security.AuthenticationWrapper;
 import org.apache.geronimo.xbeans.geronimo.jaspi.JaspiAuthModuleType;
 import org.apache.geronimo.xbeans.geronimo.jaspi.JaspiConfigProviderType;
@@ -136,9 +141,12 @@ public class TomcatModuleBuilder extends
     protected final NamespaceDrivenBuilderCollection clusteringBuilders;
 
     public static final String GBEAN_REF_CLUSTERING_BUILDERS = "ClusteringBuilders";
+    private final WebAppInfoFactory webAppInfoFactory;
 
     public TomcatModuleBuilder(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
             @ParamAttribute(name = "tomcatContainerName") AbstractNameQuery tomcatContainerName,
+            @ParamAttribute(name = "defaultWebApp") WebAppInfo defaultWebApp,
+            @ParamAttribute(name = "jspServlet") WebAppInfo jspServlet,
             @ParamReference(name="WebServiceBuilder", namingType = NameFactory.MODULE_BUILDER) Collection<WebServiceBuilder> webServiceBuilder,
             @ParamReference(name="ServiceBuilders", namingType = NameFactory.MODULE_BUILDER)Collection<NamespaceDrivenBuilder> serviceBuilders,
             @ParamReference(name="NamingBuilders", namingType = NameFactory.MODULE_BUILDER)NamingBuilder namingBuilders,
@@ -151,6 +159,14 @@ public class TomcatModuleBuilder extends
         this.defaultEnvironment = defaultEnvironment;
         this.clusteringBuilders = new NamespaceDrivenBuilderCollection(clusteringBuilders);
         this.tomcatContainerName = tomcatContainerName;
+        ServletInfo jspServletInfo;
+        if (jspServlet != null) {
+            jspServletInfo = jspServlet.servlets.get(0);
+        } else {
+            jspServletInfo = null;
+        }
+        this.webAppInfoFactory = new StandardWebAppInfoFactory(defaultWebApp, jspServletInfo);
+
     }
 
     public void doStart() throws Exception {
@@ -495,8 +511,15 @@ public class TomcatModuleBuilder extends
                 }
             }
 
-            Collection<String> listeners = new ArrayList<String>();
-            webModuleData.setAttribute("listenerClassNames", listeners);
+            WebAppInfoBuilder webAppInfoBuilder = new WebAppInfoBuilder(webApp, webAppInfoFactory);
+            WebAppInfo webAppInfo = webAppInfoBuilder.build();
+
+            webModuleData.setAttribute("webAppInfo", webAppInfo);
+
+            webModule.getSharedContext().put(WebModule.WEB_APP_INFO, webAppInfoBuilder);
+
+//            Collection<String> listeners = new ArrayList<String>();
+//            webModuleData.setAttribute("listenerClassNames", listeners);
 
             //Handle the role permissions and webservices on the servlets.
             List<org.apache.openejb.jee.Servlet> servletTypes = webApp.getServlet();
@@ -507,43 +530,43 @@ public class TomcatModuleBuilder extends
             } catch (ClassNotFoundException e) {
                 throw new DeploymentException("Could not load javax.servlet.Servlet in bundle " + bundle, e);
             }
-            for (org.apache.openejb.jee.Servlet servletType : servletTypes) {
-
-                if (servletType.getServletClass() != null) {
-                    String servletName = servletType.getServletName().trim();
-                    String servletClassName = servletType.getServletClass().trim();
-                    Class servletClass;
-                    try {
-                        servletClass = webBundle.loadClass(servletClassName);
-                    } catch (ClassNotFoundException e) {
-                        throw new DeploymentException("Could not load servlet class " + servletClassName + " from bundle " + bundle, e);
-                    }
-                    if (!baseServletClass.isAssignableFrom(servletClass)) {
-                        //fake servletData
-                        AbstractName servletAbstractName = moduleContext.getNaming().createChildName(moduleName, servletName, NameFactory.SERVLET);
-                        GBeanData servletData = new GBeanData();
-                        servletData.setAbstractName(servletAbstractName);
-                        //let the web service builder deal with configuring the gbean with the web service stack
-                        //Here we just extract the factory reference
-                        boolean configured = false;
-                        for (WebServiceBuilder serviceBuilder : webServiceBuilder) {
-                            if (serviceBuilder.configurePOJO(servletData, servletName, module, servletClassName, moduleContext)) {
-                                configured = true;
-                                break;
-                            }
-                        }
-                        if (!configured) {
-                            throw new DeploymentException("POJO web service: " + servletName + " not configured by any web service builder");
-                        }
-                        ReferencePatterns patterns = servletData.getReferencePatterns("WebServiceContainerFactory");
-                        AbstractName wsContainerFactoryName = patterns.getAbstractName();
-                        webServices.put(servletName, wsContainerFactoryName);
-                        //force all the factories to start before the web app that needs them.
-                        webModuleData.addDependency(wsContainerFactoryName);
-                    }
-
-                }
-            }
+//            for (org.apache.openejb.jee.Servlet servletType : servletTypes) {
+//
+//                if (servletType.getServletClass() != null) {
+//                    String servletName = servletType.getServletName().trim();
+//                    String servletClassName = servletType.getServletClass().trim();
+//                    Class servletClass;
+//                    try {
+//                        servletClass = webBundle.loadClass(servletClassName);
+//                    } catch (ClassNotFoundException e) {
+//                        throw new DeploymentException("Could not load servlet class " + servletClassName + " from bundle " + bundle, e);
+//                    }
+//                    if (!baseServletClass.isAssignableFrom(servletClass)) {
+//                        //fake servletData
+//                        AbstractName servletAbstractName = moduleContext.getNaming().createChildName(moduleName, servletName, NameFactory.SERVLET);
+//                        GBeanData servletData = new GBeanData();
+//                        servletData.setAbstractName(servletAbstractName);
+//                        //let the web service builder deal with configuring the gbean with the web service stack
+//                        //Here we just extract the factory reference
+//                        boolean configured = false;
+//                        for (WebServiceBuilder serviceBuilder : webServiceBuilder) {
+//                            if (serviceBuilder.configurePOJO(servletData, servletName, module, servletClassName, moduleContext)) {
+//                                configured = true;
+//                                break;
+//                            }
+//                        }
+//                        if (!configured) {
+//                            throw new DeploymentException("POJO web service: " + servletName + " not configured by any web service builder");
+//                        }
+//                        ReferencePatterns patterns = servletData.getReferencePatterns("WebServiceContainerFactory");
+//                        AbstractName wsContainerFactoryName = patterns.getAbstractName();
+//                        webServices.put(servletName, wsContainerFactoryName);
+//                        //force all the factories to start before the web app that needs them.
+//                        webModuleData.addDependency(wsContainerFactoryName);
+//                    }
+//
+//                }
+//            }
 
 
             webModuleData.setAttribute("webServices", webServices);

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java Tue Sep 21 23:43:08 2010
@@ -40,6 +40,7 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
@@ -124,6 +125,8 @@ public class PlanParsingTest extends Tes
         bundleContext.registerService(PackageAdmin.class.getName(), packageAdmin, null);
         builder = new TomcatModuleBuilder(defaultEnvironment,
                 tomcatContainerObjectName,
+                new WebAppInfo(),
+                null,
                 Collections.singleton(webServiceBuilder),
                 Arrays.asList(new GBeanBuilder(null, null), new GeronimoSecurityBuilderImpl(null, null, null)),
                 new NamingBuilderCollection(null),

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/BaseGeronimoContextConfig.java Tue Sep 21 23:43:08 2010
@@ -30,8 +30,10 @@ import javax.security.auth.message.confi
 import javax.security.auth.message.config.AuthConfigProvider;
 import javax.security.auth.message.config.RegistrationListener;
 import javax.security.auth.message.config.ServerAuthConfig;
+import javax.servlet.ServletContext;
 
 import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.deploy.ErrorPage;
 import org.apache.catalina.deploy.WebXml;
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.geronimo.security.ContextManager;
@@ -54,17 +56,63 @@ import org.apache.geronimo.tomcat.securi
 import org.apache.geronimo.tomcat.security.jacc.JACCAuthorizer;
 import org.apache.geronimo.tomcat.security.jacc.JACCRealm;
 import org.apache.geronimo.tomcat.security.jacc.JACCSecurityValve;
+import org.apache.geronimo.web.assembler.Assembler;
+import org.apache.geronimo.web.info.ErrorPageInfo;
+import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.xml.sax.InputSource;
 
 /**
  * @version $Rev$ $Date$
  */
-public class BaseGeronimoContextConfig extends ContextConfig {
+public abstract class BaseGeronimoContextConfig extends ContextConfig {
     private static final String MESSAGE_LAYER = "HttpServlet";
     private static final String POLICY_CONTEXT_ID_KEY = "javax.security.jacc.PolicyContext";
 
     private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(BaseGeronimoContextConfig.class);
 
+    private final WebAppInfo webAppInfo;
+
+    public BaseGeronimoContextConfig(WebAppInfo webAppInfo) {
+        this.webAppInfo = webAppInfo;
+    }
+
+    @Override
+    protected void init() {
+        contextConfig();
+    }
+
+    @Override
+    protected void configureStart() {
+        ServletContext servletContext = context.getServletContext();
+        Assembler assembler = new Assembler();
+        assembler.assemble(servletContext, webAppInfo);
+        context.setDisplayName(webAppInfo.displayName);
+        for (ErrorPageInfo errorPageInfo: webAppInfo.errorPages) {
+            ErrorPage errorPage = new ErrorPage();
+            errorPage.setLocation(errorPageInfo.location);
+            errorPage.setExceptionType(errorPageInfo.exceptionType);
+            if (errorPageInfo.errorCode != null) {
+                errorPage.setErrorCode(errorPageInfo.errorCode);
+            }
+            context.addErrorPage(errorPage);
+        }
+
+        for (Map.Entry<String, String> localeEncodingMapping: webAppInfo.localeEncodingMappings.entrySet()) {
+            context.addLocaleEncodingMappingParameter(localeEncodingMapping.getKey(), localeEncodingMapping.getValue());
+        }
+        for (Map.Entry<String, String> mimeMapping: webAppInfo.mimeMappings.entrySet()) {
+            context.addMimeMapping(mimeMapping.getKey(), mimeMapping.getValue());
+        }
+        for (String welcomeFile: webAppInfo.welcomeFiles) {
+            context.addWelcomeFile(welcomeFile);
+        }
+        authenticatorConfig(webAppInfo.loginConfig);
+        context.setConfigured(true);
+    }
+
+    protected abstract void authenticatorConfig(LoginConfigInfo loginConfigInfo);
+
     protected void configureSecurity(StandardContext geronimoContext, String policyContextId, ConfigurationFactory configurationFactory, Subject defaultSubject, String authMethod, String realmName, String loginPage, String errorPage) {
         if (defaultSubject == null) {
             defaultSubject = ContextManager.EMPTY;

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/EjbWsContextConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/EjbWsContextConfig.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/EjbWsContextConfig.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/EjbWsContextConfig.java Tue Sep 21 23:43:08 2010
@@ -28,6 +28,8 @@ import org.apache.catalina.core.Standard
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.tomcat.security.Authorizer;
 import org.apache.geronimo.tomcat.security.jacc.JACCEJBWebServiceAuthorizer;
+import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 
 /**
  * @version $Rev$ $Date$
@@ -39,7 +41,8 @@ public class EjbWsContextConfig extends 
     private final String authMethod;
     private final String realmName;
 
-    public EjbWsContextConfig(String policyContextId, ConfigurationFactory configurationFactory, Subject defaultSubject, String authMethod, String realmName) {
+    public EjbWsContextConfig(WebAppInfo webAppInfo, String policyContextId, ConfigurationFactory configurationFactory, Subject defaultSubject, String authMethod, String realmName) {
+        super(webAppInfo);
         this.policyContextId = policyContextId;
         this.configurationFactory = configurationFactory;
         this.defaultSubject = defaultSubject;
@@ -48,7 +51,7 @@ public class EjbWsContextConfig extends 
     }
 
     @Override
-    protected void authenticatorConfig() {
+    protected void authenticatorConfig(LoginConfigInfo loginConfigInfo) {
         if (policyContextId == null || configurationFactory == null) {
             return;
         }
@@ -60,6 +63,7 @@ public class EjbWsContextConfig extends 
                 authMethod, realmName, null, null);
     }
 
+    @Override
     protected Authorizer createAuthorizer(AccessControlContext defaultAcc) {
         return new JACCEJBWebServiceAuthorizer(defaultAcc);
     }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java Tue Sep 21 23:43:08 2010
@@ -36,7 +36,6 @@ import org.apache.catalina.LifecycleExce
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Service;
 import org.apache.catalina.connector.Connector;
-import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardService;
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.geronimo.gbean.GBeanLifecycle;
@@ -53,6 +52,7 @@ import org.apache.geronimo.osgi.web.WebA
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.apache.naming.resources.DirContextURLStreamHandlerFactory;
@@ -172,7 +172,7 @@ public class TomcatContainer implements 
             Context defaultContext;
             ObjectName objName = objectName == null ? null : ObjectName.getInstance(objectName);
             for (Container host : hosts) {
-                defaultContext = createContext("", classLoader, null);
+                defaultContext = createContext("", classLoader, new WebAppInfo());
                 defaultContext.setDocBase(docBase);
                 //Set the name of default context with "", so that while accessing an un-existing context, the default one will be used
                 defaultContext.setName("");
@@ -284,7 +284,7 @@ public class TomcatContainer implements 
      * @see org.apache.catalina.Host
      */
     public void addContext(TomcatContext contextInfo) throws Exception {
-        Context context = createContext(contextInfo.getContextPath(), contextInfo.getClassLoader(), null);
+        Context context = createContext(contextInfo.getContextPath(), contextInfo.getClassLoader(), contextInfo.getWebAppInfo());
         //Was a virtual server defined?
         String virtualServer = contextInfo.getVirtualServer();
         if (virtualServer == null) {
@@ -316,20 +316,6 @@ public class TomcatContainer implements 
             ((GeronimoStandardContext) context).setContextProperties(contextInfo);
         }
 
-        // add application listeners to the new context
-        if (applicationListeners != null) {
-            for (String listener : applicationListeners) {
-                context.addApplicationListener(listener);
-            }
-        }
-
-        Collection<String> listeners = contextInfo.getListeners();
-        if (listeners != null) {
-            for (String listener : listeners) {
-                context.addApplicationListener(listener);
-            }
-        }
-
         try {
             host.addChild(context);
         } catch (IllegalArgumentException ex) {
@@ -388,7 +374,8 @@ public class TomcatContainer implements 
 
         TomcatEJBWebServiceContext context = new TomcatEJBWebServiceContext(contextPath, webServiceContainer, classLoader);
         Subject defaultSubject = ContextManager.EMPTY;
-        ContextConfig config = new EjbWsContextConfig(policyContextId,  configurationFactory, defaultSubject, authMethod, realmName);
+        WebAppInfo webAppInfo = new WebAppInfo();
+        ContextConfig config = new EjbWsContextConfig(webAppInfo, policyContextId,  configurationFactory, defaultSubject, authMethod, realmName);
         context.addLifecycleListener(config);
 
         Context webServiceContext = (context);
@@ -421,7 +408,7 @@ public class TomcatContainer implements 
         webServices.remove(contextPath);
     }
 
-    public Context createContext(String path, ClassLoader cl, String deploymentDescriptor) {
+    public Context createContext(String path, ClassLoader cl, WebAppInfo webAppInfo) {
 
         if( log.isDebugEnabled() )
             log.debug("Creating context '" + path);
@@ -433,7 +420,7 @@ public class TomcatContainer implements 
         if (cl != null)
             context.setParentClassLoader(cl);
 
-        ContextConfig config = new WebContextConfig(deploymentDescriptor);
+        ContextConfig config = new WebContextConfig(webAppInfo);
         context.addLifecycleListener(config);
 
         context.setDelegate(true);

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java Tue Sep 21 23:43:08 2010
@@ -23,6 +23,7 @@ import java.util.Set;
 
 import javax.transaction.UserTransaction;
 
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.tomcat.InstanceManager;
 import org.apache.catalina.Context;
 import org.apache.catalina.Manager;
@@ -93,4 +94,6 @@ public interface TomcatContext {
     String getDeploymentDescriptor();
     
     Collection<String> getListeners();
+
+    WebAppInfo getWebAppInfo();
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Tue Sep 21 23:43:08 2010
@@ -67,6 +67,7 @@ import org.apache.geronimo.tomcat.cluste
 import org.apache.geronimo.tomcat.stats.ModuleStats;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.GeronimoUserTransaction;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.apache.geronimo.webservices.WebServiceContainerFactory;
 import org.apache.naming.resources.DirContextURLStreamHandler;
@@ -132,6 +133,7 @@ public class TomcatWebAppContext impleme
     private boolean reset = true;
 
     private final Valve clusteredValve;
+    private final WebAppInfo webAppInfo;
 
     public TomcatWebAppContext(
             @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader,
@@ -168,6 +170,7 @@ public class TomcatWebAppContext impleme
             @ParamReference(name = "applicationPolicyConfigurationManager") ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager,
             @ParamAttribute(name = "listenerClassNames") Collection<String> listenerClassNames,
             @ParamAttribute(name = "deploymentAttributes") Map<String, Object> deploymentAttributes,
+            @ParamAttribute(name = "webAppInfo") WebAppInfo webAppInfo,
             @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel)
             throws Exception {
         assert classLoader != null;
@@ -185,6 +188,7 @@ public class TomcatWebAppContext impleme
 
         this.objectName = objectName;
         this.deploymentAttributes = deploymentAttributes;
+        this.webAppInfo = webAppInfo;
 //        URI root;
 ////        TODO is there a simpler way to do this?
 //        if (configurationBaseUrl.getProtocol().equalsIgnoreCase("file")) {
@@ -493,6 +497,12 @@ public class TomcatWebAppContext impleme
     public Object getDeploymentAttribute(String name) {
         return deploymentAttributes.get(name);
     }
+
+    @Override
+    public WebAppInfo getWebAppInfo() {
+        return webAppInfo;
+    }
+
     /**
      * ObjectName must match this pattern: <p/>
      * domain:j2eeType=WebModule,name=MyName,J2EEServer=MyServer,J2EEApplication=MyApplication

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/WebContextConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/WebContextConfig.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/WebContextConfig.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/WebContextConfig.java Tue Sep 21 23:43:08 2010
@@ -19,33 +19,21 @@
 
 package org.apache.geronimo.tomcat;
 
-import java.io.StringReader;
-
-import org.apache.catalina.deploy.LoginConfig;
-import org.xml.sax.InputSource;
+import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 
 /**
  * @version $Rev$ $Date$
  */
 public class WebContextConfig extends BaseGeronimoContextConfig {
     
-    private String deploymentDescriptor;
-    
-    public WebContextConfig(String deploymentDescriptor) {
-        this.deploymentDescriptor = deploymentDescriptor;
-    }
-    
-    @Override
-    protected InputSource getContextWebXmlSource() {
-        if (deploymentDescriptor == null) {
-            return super.getContextWebXmlSource();
-        } else {
-            return new InputSource(new StringReader(deploymentDescriptor));
-        }
+    public WebContextConfig(WebAppInfo webAppInfo) {
+        super(webAppInfo);
     }
     
+
     @Override
-    protected void authenticatorConfig() {
+    protected void authenticatorConfig(LoginConfigInfo loginConfig) {
         if (!(context instanceof GeronimoStandardContext)) {
             throw new IllegalStateException("Unexpected context type");
         }
@@ -56,23 +44,18 @@ public class WebContextConfig extends Ba
         if (geronimoContext.getDefaultSubject() == null) {
             return;
         }
-        LoginConfig loginConfig = context.getLoginConfig();
         if (loginConfig == null) {
-            loginConfig = new LoginConfig();
+            loginConfig = new LoginConfigInfo();
         }
-        String authMethod = loginConfig.getAuthMethod();
-        String realmName = loginConfig.getRealmName();
-        String loginPage = loginConfig.getLoginPage();
-        String errorPage = loginConfig.getErrorPage();
 
         configureSecurity(geronimoContext,
                 geronimoContext.getPolicyContextId(),
                 geronimoContext.getConfigurationFactory(),
                 geronimoContext.getDefaultSubject(),
-                authMethod,
-                realmName,
-                loginPage,
-                errorPage);
+                loginConfig.authMethod,
+                loginConfig.realmName,
+                loginConfig.formLoginPage,
+                loginConfig.formErrorPage);
     }
     
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/listener/DispatchListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/listener/DispatchListener.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/listener/DispatchListener.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/listener/DispatchListener.java Tue Sep 21 23:43:08 2010
@@ -48,6 +48,16 @@ public class DispatchListener implements
 
     public void instanceEvent(InstanceEvent event) {
 
+        if (event.getType().equals(InstanceEvent.BEFORE_SERVICE_EVENT)) {
+            String oldWrapperName = JACCRealm.setRequestWrapperName(event.getWrapper().getName());
+            currentContext.get().push(new Object[] {oldWrapperName });
+        }
+
+        if (event.getType().equals(InstanceEvent.AFTER_SERVICE_EVENT)) {
+            JACCRealm.setRequestWrapperName((String) currentContext.get().pop()[0]);
+        }
+
+
         if (event.getType().equals(InstanceEvent.BEFORE_DISPATCH_EVENT)) {
             Container parent = event.getWrapper().getParent();
             if (parent instanceof GeronimoStandardContext) {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java Tue Sep 21 23:43:08 2010
@@ -60,8 +60,8 @@ import org.apache.geronimo.tomcat.connec
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.apache.geronimo.web.WebAttributeName;
-import org.apache.openejb.jee.JaxbJavaee;
-import org.apache.openejb.jee.WebApp;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.osgi.framework.Bundle;
 
 
@@ -82,7 +82,16 @@ public abstract class AbstractWebModuleT
     protected GenericSecurityRealm realm;
     private Bundle bundle;
 
-    protected TomcatWebAppContext setUpInsecureAppContext(String relativeWebAppRoot, URL configurationBaseURL, SecurityHolder securityHolder, RunAsSource runAsSource, ObjectRetriever tomcatRealm, ValveGBean valveChain) throws Exception {
+    protected void setUpStaticContentServlet(WebAppInfo webAppInfo) throws Exception {
+        ServletInfo servletInfo = new ServletInfo();
+        servletInfo.servletName = "default";
+        servletInfo.servletClass = "org.apache.catalina.servlets.DefaultServlet";
+        servletInfo.servletMappings.add("/");
+        servletInfo.initParams.put("acceptRanges", "true");
+        webAppInfo.servlets.add(servletInfo);
+    }
+
+    protected TomcatWebAppContext setUpInsecureAppContext(String relativeWebAppRoot, URL configurationBaseURL, SecurityHolder securityHolder, RunAsSource runAsSource, ObjectRetriever tomcatRealm, ValveGBean valveChain, WebAppInfo webAppInfo) throws Exception {
         configurationBaseURL = cl.getResource("deployables/");
         URI locationURI = configurationBaseURL.toURI().resolve(relativeWebAppRoot);
         MockBundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), locationURI.toString(), new HashMap<Artifact, ConfigurationData>(), null);
@@ -131,21 +140,26 @@ public abstract class AbstractWebModuleT
                 (ApplicationPolicyConfigurationManager)runAsSource,   //applicationPolicyConfigurationManager
                 null,   //listenerClassNames
                 deploymentAttributes, //Map<String, String> deploymentAttributes
+                webAppInfo, //webAppinfo
                 null);  //kernel
         app.doStart();
         return app;
     }
 
-    protected TomcatWebAppContext setUpSecureAppContext(Map roleDesignates, Map principalRoleMap, ComponentPermissions componentPermissions, RealmGBean realm, SecurityHolder securityHolder) throws Exception {
+
+
+    protected TomcatWebAppContext setUpSecureAppContext(Map roleDesignates, Map principalRoleMap, ComponentPermissions componentPermissions, RealmGBean realm, SecurityHolder securityHolder, WebAppInfo webAppInfo) throws Exception {
         ApplicationPolicyConfigurationManager jacc = setUpJACC(roleDesignates, principalRoleMap, componentPermissions, POLICY_CONTEXT_ID);
         securityHolder.setConfigurationFactory(this.realm);
         URL configurationBaseURL = new File(BASEDIR, "src/test/resources/deployables/war3/WEB-INF/web.xml").toURI().toURL();
+        setUpStaticContentServlet(webAppInfo);
         return setUpInsecureAppContext("war3",
                 configurationBaseURL,
                 securityHolder,
                 jacc,
                 realm,
-                null);
+                null,
+                webAppInfo);
     }
 
     private ApplicationPolicyConfigurationManager setUpJACC(Map<String, SubjectInfo> roleDesignates, Map<Principal, Set<String>> principalRoleMap, ComponentPermissions componentPermissions,

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/ApplicationTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/ApplicationTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/ApplicationTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/ApplicationTest.java Tue Sep 21 23:43:08 2010
@@ -22,6 +22,8 @@ import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
 
+import org.apache.geronimo.web.info.WebAppInfo;
+
 
 /**
  * @version $Rev$ $Date$
@@ -30,12 +32,14 @@ public class ApplicationTest extends Abs
     private File basedir = new File(System.getProperty("basedir"));
 
     public void testApplication() throws Exception {
+        WebAppInfo webAppInfo = new WebAppInfo();
+        setUpStaticContentServlet(webAppInfo);
         setUpInsecureAppContext("war1",
                 null,
                 null,
                 null,
                 null,
-                null);
+                null, webAppInfo);
 
         HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() +  "/test/hello.txt").openConnection();
         BufferedReader reader = null;

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JAASSecurityTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JAASSecurityTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JAASSecurityTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JAASSecurityTest.java Tue Sep 21 23:43:08 2010
@@ -30,6 +30,8 @@ import javax.management.ObjectName;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.security.credentialstore.CredentialStore;
+import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 
 /**
  * Tests the JAAS security for Tomcat
@@ -181,12 +183,19 @@ public class JAASSecurityTest extends Ab
         securityHolder.setSecurity(false);//redundant: forces use of TomcatJAASRealm not TomcatGeronimoRealm
         securityHolder.setConfigurationFactory(this.realm);
         CredentialStore credentialStore = null;
+        WebAppInfo webAppInfo = new WebAppInfo();
+        webAppInfo.loginConfig = new LoginConfigInfo();
+        webAppInfo.loginConfig.authMethod = "FORM";
+        webAppInfo.loginConfig.realmName = "geronimo-admin";
+        webAppInfo.loginConfig.formLoginPage = "/auth/logon.html?param=test";
+        webAppInfo.loginConfig.formErrorPage = "/auth/logonError.html?param=test";
+
         setUpSecureAppContext(new HashMap(),
                 new HashMap(),
                 componentPermissions,
                 null,
-                securityHolder
-        );
+                securityHolder,
+                webAppInfo);
     }
 
     protected void stopWebApp() throws Exception {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JACCSecurityTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JACCSecurityTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JACCSecurityTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/JACCSecurityTest.java Tue Sep 21 23:43:08 2010
@@ -38,6 +38,8 @@ import org.apache.geronimo.security.depl
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
+import org.apache.geronimo.web.info.LoginConfigInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
 
 
 /**
@@ -55,7 +57,6 @@ public class JACCSecurityTest extends Ab
      * @throws Exception thrown if an error in the test occurs
      */
     public void testExplicitMapping() throws Exception {
-
         String securityRealmName = "demo-properties-realm";
         String defaultPrincipalId = "izumi";
         SubjectInfo defaultSubjectInfo = new SubjectInfo(securityRealmName, defaultPrincipalId);
@@ -161,12 +162,19 @@ public class JACCSecurityTest extends Ab
         SecurityHolder securityHolder = new SecurityHolder();
         securityHolder.setSecurity(true);
         securityHolder.setPolicyContextID(POLICY_CONTEXT_ID);
+        WebAppInfo webAppInfo = new WebAppInfo();
+        webAppInfo.loginConfig = new LoginConfigInfo();
+        webAppInfo.loginConfig.authMethod = "FORM";
+        webAppInfo.loginConfig.realmName = "geronimo-admin";
+        webAppInfo.loginConfig.formLoginPage = "/auth/logon.html?param=test";
+        webAppInfo.loginConfig.formErrorPage = "/auth/logonError.html?param=test";
+
         return setUpSecureAppContext(roleDesignates,
                 principalRoleMap,
                 componentPermissions,
                 null,
-                securityHolder
-        );
+                securityHolder,
+                webAppInfo);
     }
 
     protected void stopWebApp() throws Exception {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/StatTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/StatTest.java?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/StatTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/StatTest.java Tue Sep 21 23:43:08 2010
@@ -23,6 +23,7 @@ import java.net.URL;
 
 import javax.management.j2ee.statistics.Statistic;
 import javax.management.j2ee.statistics.Stats;
+import org.apache.geronimo.web.info.WebAppInfo;
 
 /**
  * @version $Revision$ $Date$
@@ -32,8 +33,9 @@ public class StatTest extends AbstractWe
     //private ObjectName webModuleName;
 
     public void testStats() throws Exception {
-        TomcatWebAppContext webModule;
-        webModule = setUpInsecureAppContext("war1", null, null, null, null, null);
+        WebAppInfo webAppInfo = new WebAppInfo();
+        setUpStaticContentServlet(webAppInfo);
+        TomcatWebAppContext webModule = setUpInsecureAppContext("war1", null, null, null, null, null, webAppInfo);
             HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + "/test/hello.txt")
                     .openConnection();
             BufferedReader reader = null;

Modified: geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/pom.xml?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/pom.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/pom.xml Tue Sep 21 23:43:08 2010
@@ -38,6 +38,13 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>javaee-builder-support</artifactId>
+            <version>${project.version}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-deployer</artifactId>
             <version>${project.version}</version>
             <type>car</type>
@@ -107,6 +114,10 @@
                 <groupId>org.apache.geronimo.buildsupport</groupId>
                 <artifactId>car-maven-plugin</artifactId>
                 <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>org.apache.geronimo.configs/javaee-builder-support/${project.version}/car</deploymentConfig>
+                    </deploymentConfigs>
                     <category>Tomcat</category>
                     <dependencies>
                         <dependency>

Modified: geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml?rev=999688&r1=999687&r2=999688&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat7-deployer/src/main/plan/plan.xml Tue Sep 21 23:43:08 2010
@@ -88,6 +88,73 @@
                 </dependencies>
             </environment>
         </xml-attribute>
+        <xml-attribute name="defaultWebApp">
+             <web-app xmlns="http://java.sun.com/xml/ns/javaee">
+                 <servlet>
+                     <servlet-name>default</servlet-name>
+                     <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+                     <init-param>
+                         <param-name>useAcceptRanges</param-name>
+                         <param-value>true</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>listings</param-name>
+                         <param-value>true</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>readonly</param-name>
+                         <param-value>true</param-value>
+                     </init-param>
+                     <!--<init-param>-->
+                         <!--<param-name>delAllowed</param-name>-->
+                         <!--<param-value>false</param-value>-->
+                     <!--</init-param>-->
+                     <!--<init-param>-->
+                         <!--<param-name>redirectWelcome</param-name>-->
+                         <!--<param-value>false</param-value>-->
+                     <!--</init-param>-->
+                     <!--<init-param>-->
+                         <!--<param-name>sendfileSize</param-name>-->
+                         <!--<param-value>8192</param-value>-->
+                     <!--</init-param>-->
+                     <load-on-startup>0</load-on-startup>
+                 </servlet>
+                 <servlet-mapping>
+                     <servlet-name>default</servlet-name>
+                     <url-pattern>/</url-pattern>
+                 </servlet-mapping>
+
+             </web-app>
+         </xml-attribute>
+         <xml-attribute name="jspServlet">
+             <web-app xmlns="http://java.sun.com/xml/ns/javaee">
+                 <servlet>
+                     <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+                     <init-param>
+                         <param-name>development</param-name>
+                         <param-value>false</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>fork</param-name>
+                         <param-value>false</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>logVerbosityLevel</param-name>
+                         <param-value>DEBUG</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>xpoweredBy</param-name>
+                         <param-value>false</param-value>
+                     </init-param>
+                     <init-param>
+                         <param-name>engineOptionsClass</param-name>
+                         <param-value>org.apache.geronimo.jasper.JspServletOptions</param-value>
+                     </init-param>
+                 </servlet>
+             </web-app>
+
+
+         </xml-attribute>
     </gbean>
 
     <gbean name="Tomcat7WARConfigurer" class="org.apache.geronimo.web.deployment.WARConfigurer"/>



Mime
View raw message