> -----Original Message-----
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 09, 2004 1:05 PM
> To: Struts Users Mailing List
> Subject: Re: can i get ".do" from struts?
> 
> 
> 
> --- Bill Siggelkow <[EMAIL PROTECTED]> wrote:
> 
> > 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");
> 
> hi Bill, thanks for your excellent suggestions!  global forwards will
> work nicely as well.  however, i've already designated global forwards
> only for the main menus in my web app, and adding other non-main
> forwards there will break my convention.  otherwise it's definitely
> another good possiblity!

Here's a good time to break with convention, and make a new one.  You have a very good 
reason to have a global forward here.  In fact, it fits with what global forwards are 
used for.  So.... time to create a new convention that will make your life easier, and 
not harder.




> 
> 
> > 
> > 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]
> > 
> > 
> 
> 
> 
>               
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to