> From: Chris Blackwell [mailto:ch...@team193.com]
> Subject: servlet mappings
> 
> Coldfusion 9's web.xml ships with the following servelt-mapping, but it
> doesn't seem to work on Tomcat
>   <servlet-mapping id="coldfusion_mapping_6">
>      <servlet-name>CfmServlet</servlet-name>
>      <url-pattern>*.cfm/*</url-pattern>
>   </servlet-mapping>

I don't think the above mapping is valid.  To quote from the servlet spec:

"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.

"* 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."

As I understand it, the asterisks are /not/ wildcards; they're just markers in 
the syntax.  The <url-pattern> above falls under the second bullet, but there 
certainly can't be any extensions that have a slash in them.  If your URLs end 
in .cfm, just remove the /* from the <url-pattern>.  If you actually have URLs 
with a / following the .cfm, you may need to make that servlet the default one.

Note that several servlet containers silently implement "enhancements" to the 
spec that simply cause confusion and limit portability.

 - 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

Reply via email to