Why don't you use global forwards defined in your struts-config.xml.
Essentially creating a logical URL referencable by name. You can even
have a query string in the forward's path.
In your struts-config.xml:
<foward name="gotoFoo" path="/Foo.do"/>
On a JSP page:
<html:link forward="gotoFoo">Goto Foo</html:link>
Or in an action:
return mapping.findForward("gotoFoo");
Woodchuck wrote:
hihi,
does struts have a built-in way to get the literal ".do" (or whichever
extension URL ending pattern you specify) string?
or put another way, can anyone suggest an elegant way to forward to
another action?
ie. when creating an ActionForward object, it needs "/myAction.do"
instead of "/myAction"...
i don't want to hard-code any struts-config information in my code per
se, so what i'm doing is getting the desired ActionConfig based on my
Action class's fqn. and then interrogating the object for the path
value which gives me "/myAction", but i need to append the stripped
away URL ending pattern (in my case ".do").
anyone have elegant solutions for this?
please and thanks,
woodchuck
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]