You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by nejm <em...@mms.org> on 2010/06/15 04:30:33 UTC
disabling non url match returns
Hi guys, new to tomcat and I'm trying to find the appropriate web.xml tweek
to avoid trailing '/*' mapping to take place.
For example lets say abc.com/current/ is a valid request.
however abc.com/current/xyz should not be.
my Tomcat server is always returning the abc.com/current/<anything trailing>
just as though it was abc.com/current.
How can I return a 404 page not found or similar error instead of the real
xml.
thanks alot!
--
View this message in context: http://old.nabble.com/disabling-non-url-match-returns-tp28886572p28886572.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: disabling non url match returns
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: nejm [mailto:emedeiros@mms.org]
> Subject: RE: disabling non url match returns
>
> I'm running the Tomcat V6
What part of "exact version" don't you understand? 6.0.what?
> It looks like my mapping thats catching all requests would
> be the culprit
Correct.
> I imagine if that mapping was removed it may change the
> behavior in other areas?
That's completely up to you - it's your servlet code.
- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: disabling non url match returns
Posted by nejm <em...@mms.org>.
Chuck,
Thanks for the response. I'm running the Tomcat V6 and the following is my
web.xml:
It looks like my mapping thats catching all requests would be the culprit
although I imagine if that mapping was removed it may change the behavior in
other areas? I'm going to look into these changes and effects now.
Thanks again.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>MMS EXTERNAL CONTENT SERVER</display-name>
<!-- Application class name -->
<context-param>
<param-name>org.restlet.application</param-name>
<param-value>
org.mms.restlet.MainApplication
</param-value>
</context-param>
<!-- Restlet adapter -->
<servlet>
<servlet-name>RestletServlet</servlet-name>
<servlet-class>
com.noelios.restlet.ext.servlet.ServerServlet
</servlet-class>
</servlet>
<!-- Catch all requests -->
<servlet-mapping>
<servlet-name>DefaultNoListing</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
n828cl wrote:
>
>> From: nejm [mailto:emedeiros@mms.org]
>> Subject: disabling non url match returns
>>
>> new to tomcat
>
> What exact version?
>
>> and I'm trying to find the appropriate web.xml
>> tweek to avoid trailing '/*' mapping to take place.
>
> You really, really don't want to preclude that, since it would disable
> delivery of all static content.
>
>> For example lets say abc.com/current/ is a valid request.
>>
>> however abc.com/current/xyz should not be.
>>
>> my Tomcat server is always returning the abc.com/current/<anything
>> trailing> just as though it was abc.com/current.
>
> No, Tomcat isn't, but *your* servlet is. Post the web.xml for your webapp
> so we can see what mappings you have specified.
>
> - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/disabling-non-url-match-returns-tp28886572p28890700.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: disabling non url match returns
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: nejm [mailto:emedeiros@mms.org]
> Subject: disabling non url match returns
>
> new to tomcat
What exact version?
> and I'm trying to find the appropriate web.xml
> tweek to avoid trailing '/*' mapping to take place.
You really, really don't want to preclude that, since it would disable delivery of all static content.
> For example lets say abc.com/current/ is a valid request.
>
> however abc.com/current/xyz should not be.
>
> my Tomcat server is always returning the abc.com/current/<anything
> trailing> just as though it was abc.com/current.
No, Tomcat isn't, but *your* servlet is. Post the web.xml for your webapp so we can see what mappings you have specified.
- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org