emre akbas wrote:
Dave, of course I know the URL is avaliable from HttpServletRequest. I think
you didn't read my previous e-mails on the topic.
I couldn't find a way to get the remaining part of the URL after the
action's name. That is, to get /chapter1/1.html in
http://localhost:8080/action.do/chapter1/1.html
request.getPathInfo() always returns null.
I'm actually a little surprised your Action is firing at all if you're
doing *.do mapping and passing in something that doesn't end with *.do.
If you use /do/* mapping and pass in something that isn't "actively"
being mapped (i.e., mapping from "/do/chapter1/1.html" to an Action) I'm
not sure I'd expect Struts to handle this.
Now, if you do something like a wildcard mapping and define how you want
that to work (i.e., mapping from "/do/download/*/*" to an Action) you'll
probably get further--I'd look in to that.
For instance, I created a generic CRUD action class that mapped
"/do/admin/*/*" and "/do/admin/*/*/*" and stripped out chunks to get
table names, commands, and ids.
Also check out ActionMapping.getPath():
"Return context-relative path of the submitted request, starting with a
slash ("/") character, and omitting any filename extension if extension
mapping is being used."
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]