tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex <alex.alex.alex.9...@gmail.com>
Subject Re: related to bad url encoding?...
Date Tue, 22 Feb 2011 21:36:51 GMT
Mark Thomas wrote:
> On 22/02/2011 17:26, Caldarale, Charles R wrote:
>>> From: alex [mailto:alex.alex.alex.9999@gmail.com] 
>>> Subject: Re: related to bad url encoding?...
>>> shouldn't it be 404 error if tomcat can't map "this call"?
>> Tomcat 7 has introduced revised handling for situations where there is no ROOT webapp;
you might want to try that.  Regardless, you still can only use a custom error page on a mapping
failure if you've got a default webapp (ROOT) and configure ROOT's WEB-INF/web.xml for it.
> 
> It isn't going to help in this case. The URL is not valid so it is
> correctly rejected by the connector with a 400 response. Since the URL
> is invalid, it can't reliably be used to map it to a web application so
> there is no opportunity to use an application generated/supplied error page.

so, what do I do if I need to show error in this scenario and I run 
standalone tomcat?
can I do it in custom filter/connector or the only solution to place 
tomcat behind apache?



> 
> Mark
> 
> PS The change in 7 just returns a 404 rather than a 400 for requests to
> / when there is no ROOT web application defined.
> 



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


Mime
View raw message