You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/09/10 12:45:12 UTC
DO NOT REPLY [Bug 43338] New: - Setting '*' as the servlet-name in filter-mapping causes IllegalArgumentException.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43338>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43338
Summary: Setting '*' as the servlet-name in filter-mapping causes
IllegalArgumentException.
Product: Tomcat 6
Version: 6.0.14
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: keiichi.fujino@gmail.com
SRV 6.2.5 says supporting for '*' as the servlet-name in filter-mapping.
I set following filter-mapping.
<filter-mapping>
<filter-name>SampleFilter</filter-name>
<servlet-name>*</servlet-name>
</filter-mapping>
However, InvocationTargetException occurred in Digester.
It is as follows.
Sep 10, 2007 7:16:56 PM org.apache.tomcat.util.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tomcat.util.IntrospectionUtils.callMethod1
(IntrospectionUtils.java:899)
at org.apache.tomcat.util.digester.SetNextRule.end
(SetNextRule.java:193)
at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)
at org.apache.tomcat.util.digester.Digester.endElement
(Digester.java:1058)
omit...
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.IllegalArgumentException: Filter mapping must specify
either a <url-pattern> or a <servlet-name>
at org.apache.catalina.core.StandardContext.addFilterMap
(StandardContext.java:2160)
... 44 more
omit...
I made a StandardContext's patch.
Index:/tomcat6-trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- /tomcat6-trunk/java/org/apache/catalina/core/StandardContext.java
(revision 574195)
+++ /tomcat6-trunk/java/org/apache/catalina/core/StandardContext.java
(working copy)
@@ -2156,7 +2156,9 @@
if (findFilterDef(filterName) == null)
throw new IllegalArgumentException
(sm.getString("standardContext.filterMap.name", filterName));
- if ((servletNames.length == 0) && (urlPatterns.length == 0))
+ if (!filterMap.getMatchAllServletNames() &&
+ !filterMap.getMatchAllUrlPatterns() &&
+ (servletNames.length == 0) && (urlPatterns.length == 0))
throw new IllegalArgumentException
(sm.getString("standardContext.filterMap.either"));
// FIXME: Older spec revisions may still check this
I made a StandardContext's patch.
Regards.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43338] - Setting '*' as the servlet-name in filter-mapping causes IllegalArgumentException.
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43338>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43338
pr@objektpark.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pr@objektpark.de 2007-09-15 00:56 -------
Many thanks to report this bug
Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43338] - Setting '*' as the servlet-name in filter-mapping causes IllegalArgumentException.
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43338>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43338
pr@objektpark.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
------- Additional Comments From pr@objektpark.de 2007-09-14 23:53 -------
OK!
I check you fix later today
Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org