You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Michael Q. Ma" <mi...@soprano.com.au> on 2001/07/31 07:15:09 UTC

Still EXTRA PATH INFO problem

I use Tomcat 3.2.2 as the servlet container.

I have met the same problem that I want to extract the extra path info
from the request, instead of query string. What Mr. McClanahan said in
his email doesn't seem to be very correct since I have tried but failed:

Mr. McClanahan said:
======================================================================
* Map the Struts controller servlet to a path
  pattern ("/execute/*") instead of an extension ("*.do").

* This means that a typical action request might
  be something like "/execute/showAttachment" instead
  of "/showAttachment.do".

* Now, path mappings let you do something that
  extension mappings don't -- you can add "extra path"
  information after the part that selects the action,
  so you can say something like:
    "/execute/showAttachment/1.txt"
  and your "/showAttachment" action will still get
  executed.

* When the user goes to save this request, the default
  filename will be "1.txt".

======================================================================

It seems that the struts 1.0 won't treat  /1.txt of
"/execute/showAttachment/1.txt" URI as extra path info, but try to match
"/showAttachment/1.txt" with a Action class, obviously failed. So always
complains about 'Invalid path requested'.

Has somebody else have got the same problem and a solution for it?

Michael