On 9/18/2015 1:57 PM, Caldarale, Charles R wrote:
From: George Sexton [mailto:geor...@mhsoftware.com]
Subject: Filter Mapping URL Pattern
I'm trying to add a filter mapping with the URL-Pattern
<url-pattern>/*.css</url-pattern>
Which, unfortunately, isn't allowed.  You probably just need to remove the 
leading slash.

Thanks. That got me on the right track.


Can someone direct me to a a BNF definition of what's an acceptable
url-pattern in the specification, or some portion of the servlet spec
that explains the implementation of StandardContext.validateURLPattern()?
See section 12.2 of the servlet spec (not quite BNF, but probably good enough):

In the Web application deployment descriptor, the following syntax is used to 
define
mappings:
■ A string beginning with a '/' character and ending with a '/*' suffix is used 
for
path mapping.
■ A string beginning with a '*.' prefix is used as an extension mapping.
■ The empty string ("") is a special URL pattern that exactly maps to the
application's context root, i.e., requests of the form 
http://host:port/<contextroot>/.
In this case the path info is '/' and the servlet path and context path is
empty string ("").
■ A string containing only the '/' character indicates the "default" servlet of 
the
application. In this case the servlet path is the request URI minus the context 
path
and the path info is null.
■ All other strings are used for exact matches only.

  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com

Reply via email to