Catalina only needs to know about JSP URL patterns. Jasper will take care of the...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Dec 2009 15:43:31 +0000 (15:43 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Dec 2009 15:43:31 +0000 (15:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@893208 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/deploy/JspPropertyGroup.java [deleted file]
java/org/apache/catalina/startup/WebRuleSet.java
java/org/apache/catalina/startup/WebXml.java

diff --git a/java/org/apache/catalina/deploy/JspPropertyGroup.java b/java/org/apache/catalina/deploy/JspPropertyGroup.java
deleted file mode 100644 (file)
index a208488..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.catalina.deploy;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * Representation of a jsp-property-group element in web.xml.
- */
-public class JspPropertyGroup {
-    private Boolean deferredSyntax = null;
-    public void setDeferredSyntax(String deferredSyntax) {
-        this.deferredSyntax = Boolean.valueOf(deferredSyntax);
-    }
-    public Boolean getDeferredSyntax() { return deferredSyntax; }
-
-    private Boolean elIgnored = null;
-    public void setElIgnored(String elIgnored) {
-        this.elIgnored = Boolean.valueOf(elIgnored);
-    }
-    public Boolean getElIgnored() { return elIgnored; }
-
-    private Set<String> includeCodas = new LinkedHashSet<String>();
-    public void addIncludeCoda(String includeCoda) {
-        includeCodas.add(includeCoda);
-    }
-    public Set<String> getIncludeCodas() { return includeCodas; }
-
-    private Set<String> includePreludes = new LinkedHashSet<String>();
-    public void addIncludePrelude(String includePrelude) {
-        includePreludes.add(includePrelude);
-    }
-    public Set<String> getIncludePreludes() { return includePreludes; }
-
-    private Boolean isXml = null;
-    public void setIsXml(String isXml) {
-        this.isXml = Boolean.valueOf(isXml);
-    }
-    public Boolean getIsXml() { return isXml; }
-
-    private String pageEncoding = null;
-    public void setPageEncoding(String pageEncoding) {
-        this.pageEncoding = pageEncoding;
-    }
-    public String getPageEncoding() { return this.pageEncoding; }
-    
-    private Boolean scriptingInvalid = null;
-    public void setScriptingInvalid(String scriptingInvalid) {
-        this.scriptingInvalid = Boolean.valueOf(scriptingInvalid);
-    }
-    public Boolean getScriptingInvalid() { return scriptingInvalid; }
-
-    private Boolean trimWhitespace = null;
-    public void setTrimWhitespace(String trimWhitespace) {
-        this.trimWhitespace = Boolean.valueOf(trimWhitespace);
-    }
-    public Boolean getTrimWhitespace() { return trimWhitespace; }
-
-    private String urlPattern = null;
-    public void setUrlPattern(String urlPattern) {
-        this.urlPattern = urlPattern;
-    }
-    public String getUrlPattern() { return this.urlPattern; }
-    
-}
index eab868c..dc4bd2b 100644 (file)
@@ -261,29 +261,8 @@ public class WebRuleSet extends RuleSetBase {
         digester.addRule(fullPrefix + "/jsp-config",
                          jspConfig);
 
-        digester.addObjectCreate(fullPrefix + "/jsp-config/jsp-property-group",
-                                 "org.apache.catalina.deploy.JspPropertyGroup");
-        digester.addSetNext(fullPrefix + "/jsp-config/jsp-property-group",
-                            "addJspPropertyGroup",
-                            "org.apache.catalina.deploy.JspPropertyGroup");
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/deferred-syntax-allowed-as-literal",
-                               "setDeferredSyntax", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/el-ignored",
-                               "setElIgnored", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/include-coda",
-                               "addIncludeCoda", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/include-prelude",
-                               "addIncludePrelude", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/is-xml",
-                               "setIsXml", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/page-encoding",
-                               "setPageEncoding", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/scripting-invalid",
-                               "setScriptingInvalid", 0);
-        digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/trim-directive-whitespaces",
-                               "setTrimWhitespace", 0);
         digester.addCallMethod(fullPrefix + "/jsp-config/jsp-property-group/url-pattern",
-                               "setUrlPattern", 0);
+                               "addJspUrlPattern", 0);
 
         digester.addRule(fullPrefix + "/login-config",
                          loginConfig);
index f258459..b8be7c2 100644 (file)
@@ -41,7 +41,6 @@ import org.apache.catalina.deploy.ContextService;
 import org.apache.catalina.deploy.ErrorPage;
 import org.apache.catalina.deploy.FilterDef;
 import org.apache.catalina.deploy.FilterMap;
-import org.apache.catalina.deploy.JspPropertyGroup;
 import org.apache.catalina.deploy.LoginConfig;
 import org.apache.catalina.deploy.MessageDestination;
 import org.apache.catalina.deploy.MessageDestinationRef;
@@ -276,13 +275,15 @@ public class WebXml {
     public Map<String,String> getTaglibs() { return taglibs; }
     
     // jsp-config/jsp-property-group
-    private Set<JspPropertyGroup> jspPropertyGroups =
-        new HashSet<JspPropertyGroup>();
-    public void addJspPropertyGroup(JspPropertyGroup propertyGroup) {
-        jspPropertyGroups.add(propertyGroup);
+    // URL pattern is the only attribute Catalina needs to know. Jasper handles
+    // all the others
+    private Set<String> jspUrlPatterns =
+        new HashSet<String>();
+    public void addJspUrlPattern(String urlPattern) {
+        jspUrlPatterns.add(urlPattern);
     }
-    public Set<JspPropertyGroup> getJspPropertyGroups() {
-        return jspPropertyGroups;
+    public Set<String> getJspUrlPatterns() {
+        return jspUrlPatterns;
     }
 
     // security-constraint
@@ -600,8 +601,8 @@ public class WebXml {
         }
 
         // Do this last as it depends on servlets
-        for (JspPropertyGroup jspPropertyGroup : jspPropertyGroups) {
-            context.addJspMapping(jspPropertyGroup.getUrlPattern());
+        for (String urlPattern : jspUrlPatterns) {
+            context.addJspMapping(urlPattern);
         }
     }
     
@@ -726,9 +727,9 @@ public class WebXml {
         filters.putAll(temp.getFilters());
 
         for (WebXml fragment : fragments) {
-            for (JspPropertyGroup jspPropertyGroup : fragment.getJspPropertyGroups()) {
+            for (String urlPattern : fragment.getJspUrlPatterns()) {
                 // Always additive
-                addJspPropertyGroup(jspPropertyGroup);
+                addJspUrlPattern(urlPattern);
             }
         }