You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by prabath <sa...@gmail.com> on 2007/06/04 15:06:52 UTC

Getting the path attribute of tag inside Action class

Hi,

  I like to get the path attribute of action tag declared in
struts-config.xml  inside my Action class.

<action path="/........."         ....> 


Is there any way?

The reason I want is, I have declared different action mappings(in
struts-config.xml) for the same Action class. Now I want to get the name of
the action mappings inside the Action class for some manipulation work.

Is there any way to get it from HttpServletRequest object ? or any other
solution available??

Thanks

-- 
View this message in context: http://www.nabble.com/Getting-the-path-attribute-of-%3Caction%3E-tag-inside-Action-class-tf3865118.html#a10949475
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Getting the path attribute of tag inside Action class

Posted by "Raghupathy, Gurumoorthy" <Gu...@nielsen.com>.
Instead of you doing it why don't you use the 

http://struts.apache.org/1.x/struts-extras/apidocs/org/apache/struts/act
ions/DispatchAction.html 

And DispatchLookupAction

Nice way to do lot of things in a modular way :)

Thanks
Giri

-----Original Message-----
From: Nuwan Chandrasoma [mailto:mymailnot@gmail.com] 
Sent: 04 June 2007 18:21
To: Struts Users Mailing List
Subject: Re: Getting the path attribute of <action> tag inside Action
class

hi,

you can getting from the ActionMapping object that is available from the

action.


Thanks,

Nuwan

----- Original Message ----- 
From: "prabath" <sa...@gmail.com>
To: <us...@struts.apache.org>
Sent: Monday, June 04, 2007 1:06 PM
Subject: Getting the path attribute of <action> tag inside Action class


>
> Hi,
>
>  I like to get the path attribute of action tag declared in
> struts-config.xml  inside my Action class.
>
> <action path="/........."         ....>
>
>
> Is there any way?
>
> The reason I want is, I have declared different action mappings(in
> struts-config.xml) for the same Action class. Now I want to get the
name 
> of
> the action mappings inside the Action class for some manipulation
work.
>
> Is there any way to get it from HttpServletRequest object ? or any
other
> solution available??
>
> Thanks
>
> -- 
> View this message in context: 
>
http://www.nabble.com/Getting-the-path-attribute-of-%3Caction%3E-tag-ins
ide-Action-class-tf3865118.html#a10949475
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Getting the path attribute of tag inside Action class

Posted by Nuwan Chandrasoma <my...@gmail.com>.
hi,

you can getting from the ActionMapping object that is available from the 
action.


Thanks,

Nuwan

----- Original Message ----- 
From: "prabath" <sa...@gmail.com>
To: <us...@struts.apache.org>
Sent: Monday, June 04, 2007 1:06 PM
Subject: Getting the path attribute of <action> tag inside Action class


>
> Hi,
>
>  I like to get the path attribute of action tag declared in
> struts-config.xml  inside my Action class.
>
> <action path="/........."         ....>
>
>
> Is there any way?
>
> The reason I want is, I have declared different action mappings(in
> struts-config.xml) for the same Action class. Now I want to get the name 
> of
> the action mappings inside the Action class for some manipulation work.
>
> Is there any way to get it from HttpServletRequest object ? or any other
> solution available??
>
> Thanks
>
> -- 
> View this message in context: 
> http://www.nabble.com/Getting-the-path-attribute-of-%3Caction%3E-tag-inside-Action-class-tf3865118.html#a10949475
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org