+++ /dev/null
-/*
- * 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; }
-
-}
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);
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;
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
}
// Do this last as it depends on servlets
- for (JspPropertyGroup jspPropertyGroup : jspPropertyGroups) {
- context.addJspMapping(jspPropertyGroup.getUrlPattern());
+ for (String urlPattern : jspUrlPatterns) {
+ context.addJspMapping(urlPattern);
}
}
filters.putAll(temp.getFilters());
for (WebXml fragment : fragments) {
- for (JspPropertyGroup jspPropertyGroup : fragment.getJspPropertyGroups()) {
+ for (String urlPattern : fragment.getJspUrlPatterns()) {
// Always additive
- addJspPropertyGroup(jspPropertyGroup);
+ addJspUrlPattern(urlPattern);
}
}