> From: Dave Pawson [mailto:dave.paw...@gmail.com]
> Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place
> to constrain the mime type?
>
> I want to 'reject' (if that's the right word) any http get
> with mime type != application/xml

Do you mean .html and .jsp are not valid?  That might make life interesting.  
It will be difficult to stop clients from accepting at least text/html in 
addition to application/xml.

> I see in web.xml in the conf directory
>  <mime-mapping>
>         <extension>xml</extension>
>         <mime-type>application/xml</mime-type>
>     </mime-mapping>
> Is this the right place to do it please?

No - that would pretty much certainly break things.  Also, AFAIK, that's only 
used for responses, so that the container can set the mime type properly for 
whatever resource is being returned.

You probably need to do this in a filter that will see the request before your 
servlets do.

 - 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