struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Thiebaud <cthieb...@stylo.it>
Subject Incorrect (?) handling of path identification when using Apache+Tomcat+Struts
Date Wed, 04 Oct 2000 10:07:48 GMT
Hi everybody,

when I access my 'foo' struts-based application through
http://foo.com:8080/foo
everything works fine 

when I use apache in 'Apache-Tomcat Smart Context Redirection' as in described
in
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-apache-howto.html

struts will not handle the requests in the form :
http://foo.com/foo/something.do
but reply instead "Error:400 Invalid Path was requested"

Debbuging the code for ActionServlet
I see that request.getPathInfo()
returns null when called directly by tomcat
and "" when called through Apache

so the following test in ActionServlet (#1252)
> // For prefix matching, we want to match on the path info (if any)
> path = request.getPathInfo();
> if (path != null)
>     return (path);
returns an empty path, thus the error.

shouldn't this code be:
> // For prefix matching, we want to match on the path info (if any)
> path = request.getPathInfo();
>(+) if (path != null && 0<path.length())
>     return (path);

or am I mistaking something in my Apache-Tomcat Smart Context Redirection
configuration ?

Christophe

Mime
View raw message