tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 3736] - incorrect PathInfo on first invocation of servlet chain
Date Thu, 20 Sep 2001 21:38:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3736

incorrect PathInfo on first invocation of servlet chain

craig.mcclanahan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From craig.mcclanahan@sun.com  2001-09-20 14:38 -------
Your examples are using request URIs that utilize the Tomcat "invoker" servlet. 
Because invoker service is *not* defined in the servlet specification, there are
no requirements for how it is to behave.

In particular, in Tomcat, the invoker is mapped to "/servlet/*".  The very first
time a request for servlet S3 is processed (say "/servlet/S3/path/info"), the
invoker servlet will create a *new* servlet definition for this servlet
dynamically, and map it to "/servlet/S3/* for all future requests.

However, at the moment your filter is called, this has not happened yet (because
your filter is called before the invoker servlet).  Therefore, your filter will
see the servlet path set to "/servlet" and extra path info set to
"/S3/path/info" on the very first request.  This is exactly what the Servlet
Specification requires, and cannot be changed.

If you want consistent results even on the first request, you should explicitly
map your servlet to a particular mapping pattern.  That way, your filter will
always get consistent results (and your application will also be portable to
other servlet containers, which it is not right now).

Mime
View raw message