struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Froehlich" <Jan.Froehl...@infomotion.de>
Subject AW: Something like getCurrentAction(...)
Date Thu, 26 Jun 2008 15:21:22 GMT
Can you give me a quick hint, how I can access what I need? Not sure
what I should search for....

Try this:

http://struts.apache.org/2.x/docs/how-do-we-access-the-action-invocation
-action-name-or-namespace-from-a-view.html

On Thu, Jun 26, 2008 at 10:15 AM, Jan Froehlich
<Jan.Froehlich@infomotion.de> wrote:
> Something I forgot to tell....
>
> I already tried the way using the <s:property value="#action" /> but
as
> I use a default action for most of my calls its not a possibility...
>
>
>
> Hi all,
>
> As I am not sure if I can explain the whole context of my problem just
a
> short description of what I got and what I want:
> I got an Action extending ActionSupport where I added a
> getCurrentAction() method.
>
>        public String getCurrentAction() {
>                String sRequestURL =
> getRequest().getRequestURL().toString();
>                return
> sRequestURL.substring(sRequestURL.lastIndexOf('/') + 1,
> sRequestURL.length() - 1);
>        }
>
> The problem (with tiles I guess) is that I always get the url from my
> tiles master template and not from the action that was called.
> After I debugged the request object I found an array called
> "specialAttributes" where I found the action name.
>
> Is it possible to access those specialAttributes, or is there any
other
> way?
>
> Regards
> Jan
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
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


Mime
View raw message