You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2010/07/29 08:59:20 UTC
svn commit: r980341 -
/geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java
Author: xuhaihong
Date: Thu Jul 29 06:59:19 2010
New Revision: 980341
URL: http://svn.apache.org/viewvc?rev=980341&view=rev
Log:
Fix a typo error in the rule configuration
Modified:
geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java
Modified: geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java?rev=980341&r1=980340&r2=980341&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java (original)
+++ geronimo/external/trunk/tomcat-parent-7.0.0/catalina/src/main/java/org/apache/catalina/startup/WebRuleSet.java Thu Jul 29 06:59:19 2010
@@ -5,9 +5,9 @@
* 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.
@@ -78,17 +78,17 @@ public class WebRuleSet extends RuleSetB
* The <code>SetSessionConfig</code> rule used to parse the web.xml
*/
protected SetSessionConfig sessionConfig;
-
-
+
+
/**
* The <code>SetLoginConfig</code> rule used to parse the web.xml
*/
protected SetLoginConfig loginConfig;
-
+
/**
* The <code>SetJspConfig</code> rule used to parse the web.xml
- */
+ */
protected SetJspConfig jspConfig;
@@ -156,7 +156,7 @@ public class WebRuleSet extends RuleSetB
sessionConfig = new SetSessionConfig();
jspConfig = new SetJspConfig();
loginConfig = new SetLoginConfig();
-
+
digester.addRule(fullPrefix,
new SetPublicIdRule("setPublicId"));
digester.addRule(fullPrefix,
@@ -260,7 +260,7 @@ public class WebRuleSet extends RuleSetB
digester.addCallMethod(fullPrefix + "/listener/listener-class",
"addListener", 0);
-
+
digester.addRule(fullPrefix + "/jsp-config",
jspConfig);
@@ -379,7 +379,7 @@ public class WebRuleSet extends RuleSetB
"setServletClass", 0);
digester.addCallMethod(fullPrefix + "/servlet/servlet-name",
"setServletName", 0);
-
+
digester.addObjectCreate(fullPrefix + "/servlet/multipart-config",
"org.apache.catalina.deploy.MultipartDef");
digester.addSetNext(fullPrefix + "/servlet/multipart-config",
@@ -399,7 +399,7 @@ public class WebRuleSet extends RuleSetB
digester.addCallMethod(fullPrefix + "/servlet/enabled",
"setEnabled", 0);
-
+
digester.addRule(fullPrefix + "/servlet-mapping",
new CallMethodMultiRule("addServletMapping", 2, 0));
digester.addCallParam(fullPrefix + "/servlet-mapping/servlet-name", 1);
@@ -477,7 +477,7 @@ public class WebRuleSet extends RuleSetB
//ejb-ref
digester.addObjectCreate(fullPrefix + "/ejb-ref",
"org.apache.catalina.deploy.ContextEjb");
- digester.addSetNext(fullPrefix + "/ejb-ref",
+ digester.addSetNext(fullPrefix + "/ejb-ref",
"addEjbRef",
"org.apache.catalina.deploy.ContextEjb");
digester.addCallMethod(fullPrefix + "/ejb-ref/description",
@@ -520,7 +520,7 @@ public class WebRuleSet extends RuleSetB
"setName", 0);
digester.addCallMethod(fullPrefix + "/resource-env-ref/resource-env-ref-type",
"setType", 0);
- configureInjectionRules(digester, "web-app/ejb-local-ref/");
+ configureInjectionRules(digester, "web-app/resource-env-ref/");
//message-destination
digester.addObjectCreate(fullPrefix + "/message-destination",
@@ -660,7 +660,7 @@ public class WebRuleSet extends RuleSetB
/**
- * Rule to check that the <code>login-config</code> is occurring
+ * Rule to check that the <code>login-config</code> is occurring
* only 1 time within the web.xml
*/
final class SetLoginConfig extends Rule {
@@ -683,7 +683,7 @@ final class SetLoginConfig extends Rule
/**
- * Rule to check that the <code>jsp-config</code> is occurring
+ * Rule to check that the <code>jsp-config</code> is occurring
* only 1 time within the web.xml
*/
final class SetJspConfig extends Rule {
@@ -706,7 +706,7 @@ final class SetJspConfig extends Rule {
/**
- * Rule to check that the <code>session-config</code> is occurring
+ * Rule to check that the <code>session-config</code> is occurring
* only 1 time within the web.xml
*/
final class SetSessionConfig extends Rule {
@@ -813,7 +813,7 @@ final class SetPublicIdRule extends Rule
m.invoke(top, (Object [])paramValues);
if (digester.getLogger().isDebugEnabled())
- digester.getLogger().debug("" + top.getClass().getName() + "."
+ digester.getLogger().debug("" + top.getClass().getName() + "."
+ method + "(" + paramValues[0] + ")");
}
@@ -886,7 +886,7 @@ final class CallParamMultiRule extends C
final class CallMethodMultiRule extends CallMethodRule {
protected int multiParamIndex = 0;
-
+
public CallMethodMultiRule(String methodName, int paramCount, int multiParamIndex) {
super(methodName, paramCount);
this.multiParamIndex = multiParamIndex;
@@ -894,11 +894,11 @@ final class CallMethodMultiRule extends
/**
* Process the end of this element.
- *
- * @param namespace the namespace URI of the matching element, or an
+ *
+ * @param namespace the namespace URI of the matching element, or an
* empty string if the parser is not namespace aware or the element has
* no namespace
- * @param name the local name if the parser is namespace aware, or just
+ * @param name the local name if the parser is namespace aware, or just
* the element name otherwise
*/
@Override
@@ -911,18 +911,18 @@ final class CallMethodMultiRule extends
} else {
super.end(namespace, name);
}
-
+
ArrayList<?> multiParams = (ArrayList<?>) parameters[multiParamIndex];
-
+
// Construct the parameter values array we will need
// We only do the conversion if the param value is a String and
- // the specified paramType is not String.
+ // the specified paramType is not String.
Object paramValues[] = new Object[paramTypes.length];
for (int i = 0; i < paramTypes.length; i++) {
if (i != multiParamIndex) {
- // convert nulls and convert stringy parameters
+ // convert nulls and convert stringy parameters
// for non-stringy param types
- if(parameters[i] == null || (parameters[i] instanceof String
+ if(parameters[i] == null || (parameters[i] instanceof String
&& !String.class.isAssignableFrom(paramTypes[i]))) {
paramValues[i] =
IntrospectionUtils.convert((String) parameters[i], paramTypes[i]);
@@ -952,17 +952,17 @@ final class CallMethodMultiRule extends
sb.append(")");
throw new org.xml.sax.SAXException(sb.toString());
}
-
+
if (multiParams == null) {
paramValues[multiParamIndex] = null;
IntrospectionUtils.callMethodN(target, methodName, paramValues,
- paramTypes);
+ paramTypes);
return;
}
-
+
for (int j = 0; j < multiParams.size(); j++) {
Object param = multiParams.get(j);
- if(param == null || (param instanceof String
+ if(param == null || (param instanceof String
&& !String.class.isAssignableFrom(paramTypes[multiParamIndex]))) {
paramValues[multiParamIndex] =
IntrospectionUtils.convert((String) param, paramTypes[multiParamIndex]);
@@ -970,9 +970,9 @@ final class CallMethodMultiRule extends
paramValues[multiParamIndex] = param;
}
IntrospectionUtils.callMethodN(target, methodName, paramValues,
- paramTypes);
+ paramTypes);
}
-
+
}
}
@@ -981,7 +981,7 @@ final class CallMethodMultiRule extends
/**
* A Rule that check if the annotations have to be loaded.
- *
+ *
*/
final class IgnoreAnnotationsRule extends Rule {
@@ -1011,7 +1011,7 @@ final class IgnoreAnnotationsRule extend
/**
* A Rule that records the spec version of the web.xml being parsed
- *
+ *
*/
final class VersionRule extends Rule {
@@ -1025,7 +1025,7 @@ final class VersionRule extends Rule {
throws Exception {
WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1);
webxml.setVersion(attributes.getValue("version"));
-
+
if (digester.getLogger().isDebugEnabled()) {
digester.getLogger().debug
(webxml.getClass().getName() + ".setVersion( " +
@@ -1040,39 +1040,39 @@ final class VersionRule extends Rule {
* A rule that logs a warning if absolute ordering is configured.
*/
final class AbsoluteOrderingRule extends Rule {
-
+
public AbsoluteOrderingRule() {
// NO-OP
}
-
+
@Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
digester.getLogger().warn(
WebRuleSet.sm.getString("webRuleSet.absoluteOrdering"));
- }
+ }
}
/**
* A rule that logs a warning if relative ordering is configured.
*/
final class RelativeOrderingRule extends Rule {
-
+
public RelativeOrderingRule() {
// NO-OP
}
-
+
@Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
digester.getLogger().warn(
WebRuleSet.sm.getString("webRuleSet.relativeOrdering"));
- }
+ }
}
/**
* A Rule that sets soap headers on the ContextHandler.
- *
+ *
*/
final class SoapHeaderRule extends Rule {
@@ -1083,10 +1083,10 @@ final class SoapHeaderRule extends Rule
/**
* Process the body text of this element.
*
- * @param namespace the namespace URI of the matching element, or an
+ * @param namespace the namespace URI of the matching element, or an
* empty string if the parser is not namespace aware or the element has
* no namespace
- * @param name the local name if the parser is namespace aware, or just
+ * @param name the local name if the parser is namespace aware, or just
* the element name otherwise
* @param text The body text of this element
*/
@@ -1108,7 +1108,7 @@ final class SoapHeaderRule extends Rule
/**
* A Rule that sets service qname on the ContextService.
- *
+ *
*/
final class ServiceQnameRule extends Rule {
@@ -1119,10 +1119,10 @@ final class ServiceQnameRule extends Rul
/**
* Process the body text of this element.
*
- * @param namespace the namespace URI of the matching element, or an
+ * @param namespace the namespace URI of the matching element, or an
* empty string if the parser is not namespace aware or the element has
* no namespace
- * @param name the local name if the parser is namespace aware, or just
+ * @param name the local name if the parser is namespace aware, or just
* the element name otherwise
* @param text The body text of this element
*/
@@ -1141,20 +1141,20 @@ final class ServiceQnameRule extends Rul
contextService.setServiceqnameLocalpart(localpart);
contextService.setServiceqnameNamespaceURI(namespaceuri);
}
-
+
}
/**
- * A rule that checks if the taglib element is in the right place.
+ * A rule that checks if the taglib element is in the right place.
*/
final class TaglibLocationRule extends Rule {
final boolean isServlet24OrLater;
-
+
public TaglibLocationRule(boolean isServlet24OrLater) {
this.isServlet24OrLater = isServlet24OrLater;
}
-
+
@Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
@@ -1168,5 +1168,5 @@ final class TaglibLocationRule extends R
}
}
-
+
}
\ No newline at end of file