This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Extra Path Info weirdness Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Extra Path Info weirdness" Watch "Extra Path Info weirdness" New topic
Author

Extra Path Info weirdness

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41635
    
  55
I have a servlet XYZ that processes extra path info. But whenever extra path info is actually part of the URL, the servlet isn't called by Tomcat, and a 404 error message appears instead.

So

http://localhost:8080/app/XYZ

is routed to the servlet just fine, while

http://localhost:8080/app/XYZ/path

is incorrectly handled by Tomcat internally, no matter what the path info consists of.

Both requests show up in the access log just fine. The problem is not with extra path info in general, since the RequestInfoExample that ships with Tomcat works fine. Has anyone ever seen this?


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What are you using for a mapping?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41635
    
  55
D'oh!. Thanks Ben, that was it. I had mapped to "/XYZ" instead of "/XYZ/*".
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Extra Path Info weirdness