David Noll wrote:
> Hello,
>
> Hopefully this is a no-brainer. How can I configure struts to call an
> action, and include the path info? EG - my normal action is called at:
>
> server/action.do
>
> I would like to call this action like this:
>
> server/action.do/some/extra/random/parameters/etc
>
> and later on, in my action class access that extra info via
> javax.servlet.http.HttpServletRequest.getPathInfo(). With out of the
> box servlet init params and action.xml values, I get an error
> specifying that an invalid path was requested. I'm developing against
> struts .5, if it makes a difference.
Well, it's simple but not necessarily obvious ...
The servlet spec's definition of extension mapping is that it only looks for an
extension after the last slash. In effect, that means you cannot use path info
with extension mapped servlets. Alternatives:
* Use path-mapped servlets instead (maybe "/do/*").
* Pass the extra info as a query string rather than
as extra path info.
>
> Thanks,
> David
>
Craig McClanahan