--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Woodchuck said the following on 9/9/2004 2:29 PM:
> 
> > 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?
> 
> Taking a quick look at the form tag source code it looks like that 
> mapping is placed in scope under the Globals.SERVLET_KEY key. So if
> you 
> wanted I guess you could get it out like...
> 
> ${applicationScope["org.apache.struts.action.SERVLET_MAPPING"]}
>

thanks Rick!  in my Action class i have to do this:

this.getServlet().getServletContext().getAttribute(Globals.SERVLET_KEY)

and it returns "*.do"

 
> I still don't see why you'd really need to do this though. Couldn't
> you 
> just make the mapping something like /app/* or /control/* something
> VERY 
> generic. If it's so generic I don't think you'd ever need to change
> it. 
> You could even make it /a/* or whatever.

very true.


> 
> -- 
> Rick
> 



                
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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

Reply via email to