From: markt Date: Tue, 22 Dec 2009 15:43:31 +0000 (+0000) Subject: Catalina only needs to know about JSP URL patterns. Jasper will take care of the... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1cda386b40f98b7e5f8bfb429ed803717a69f5bb;p=tomcat7.0 Catalina only needs to know about JSP URL patterns. Jasper will take care of the rest. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@893208 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/deploy/JspPropertyGroup.java b/java/org/apache/catalina/deploy/JspPropertyGroup.java deleted file mode 100644 index a208488dd..000000000 --- a/java/org/apache/catalina/deploy/JspPropertyGroup.java +++ /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 includeCodas = new LinkedHashSet(); - public void addIncludeCoda(String includeCoda) { - includeCodas.add(includeCoda); - } - public Set getIncludeCodas() { return includeCodas; } - - private Set includePreludes = new LinkedHashSet(); - public void addIncludePrelude(String includePrelude) { - includePreludes.add(includePrelude); - } - public Set 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; } - -} diff --git a/java/org/apache/catalina/startup/WebRuleSet.java b/java/org/apache/catalina/startup/WebRuleSet.java index eab868c43..dc4bd2bee 100644 --- a/java/org/apache/catalina/startup/WebRuleSet.java +++ b/java/org/apache/catalina/startup/WebRuleSet.java @@ -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); diff --git a/java/org/apache/catalina/startup/WebXml.java b/java/org/apache/catalina/startup/WebXml.java index f258459e5..b8be7c21a 100644 --- a/java/org/apache/catalina/startup/WebXml.java +++ b/java/org/apache/catalina/startup/WebXml.java @@ -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 getTaglibs() { return taglibs; } // jsp-config/jsp-property-group - private Set jspPropertyGroups = - new HashSet(); - 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 jspUrlPatterns = + new HashSet(); + public void addJspUrlPattern(String urlPattern) { + jspUrlPatterns.add(urlPattern); } - public Set getJspPropertyGroups() { - return jspPropertyGroups; + public Set 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); } }