You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by George Sexton <ge...@mhsoftware.com> on 2009/04/25 22:25:43 UTC

Is a servlet container compliant if?

Say you have a deployment descriptor:

<servlet>
   <servlet-name>MapTest</servlet-name>
   <servlet-class>com.mhsoftware.maptest.servlet.MapTest</servlet-class>
</servlet>
<servlet-mapping>
   <servlet-name>MapTest</servlet-name>
   <url-pattern>/MapTest.xyz</url-pattern>
</servlet-mapping>

Is a container compliant with the Servlet API Specification if it does
not pass requests for /context/MapTest.xyz to the MapTest servlet?

My reading of Servlet API 2.4 Specification, paragraph 11.2.1:

"A servlet container is allowed to make other implicit mappings as long 
as explicit mappings take precedence. For example, an implicit mapping 
of *.shtml could be mapped to include functionality on the server."

is that if an explicit mapping exists in the deployment descriptor for 
/MapTest.xyz, then to be compliant the container must pass the request 
to the mapped servlet, and not invoke the "implicit" mapping.

Is this correct?


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Is a servlet container compliant if?

Posted by Mark Thomas <ma...@apache.org>.
George Sexton wrote:
> Say you have a deployment descriptor:
> 
> <servlet>
>   <servlet-name>MapTest</servlet-name>
>   <servlet-class>com.mhsoftware.maptest.servlet.MapTest</servlet-class>
> </servlet>
> <servlet-mapping>
>   <servlet-name>MapTest</servlet-name>
>   <url-pattern>/MapTest.xyz</url-pattern>
> </servlet-mapping>
> 
> Is a container compliant with the Servlet API Specification if it does
> not pass requests for /context/MapTest.xyz to the MapTest servlet?
> 
> My reading of Servlet API 2.4 Specification, paragraph 11.2.1:
> 
> "A servlet container is allowed to make other implicit mappings as long
> as explicit mappings take precedence. For example, an implicit mapping
> of *.shtml could be mapped to include functionality on the server."
> 
> is that if an explicit mapping exists in the deployment descriptor for
> /MapTest.xyz, then to be compliant the container must pass the request
> to the mapped servlet, and not invoke the "implicit" mapping.
> 
> Is this correct?

My reading of the spec concurs with yours. There is also SRV.11.1 para 1 which
makes clear exact matches take precedence.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org