You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yaragalla Muralidhar <ya...@gmail.com> on 2013/09/29 19:52:30 UTC

is there a way to get action name in the execute method?

Hi for some reason i need to know the action name that is executed in
action class execute method. Is it possible to get the action name to which
the action class is mapped to in the action classes execute method?


*Thanks and Regards,*
Muralidhar Yaragalla.
*
*

Re: is there a way to get action name in the execute method?

Posted by Yaragalla Muralidhar <ya...@gmail.com>.
hi my problem is refresh, back and forward buttons in the browser. This
buttons though are very help full, sometimes this may lead to duplicate
submissions and can mess up the database. In solving this problem at some
point i thought it will be of great help if i can get the action name of
the action class that is being executed.

The following is the way to get the action name in the action class:-

ActionContext.getContext().getName()

The factory method "getContext()" in the ActionContext class returns the
"ActionContext" object. so the "getName()" method in the "ActionContext"
class returns the name of the action.

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*


On Mon, Sep 30, 2013 at 8:03 AM, Dale Newfield <da...@newfield.org> wrote:

> For the benefit of others in the future searching archives of this list
> for the answer to the same question, would you please describe your
> scenario and solution in another post?
>
> -Dale
>
>
> On 9/29/13 2:03 PM, Yaragalla Muralidhar wrote:
>
>> I got the answer. Thanks.
>>
>> *Thanks and Regards,*
>>
>> Muralidhar Yaragalla.
>>
>> On Sun, Sep 29, 2013 at 11:22 PM, Yaragalla Muralidhar <
>> yaragallamurali@gmail.com> wrote:
>>
>>  Hi for some reason i need to know the action name that is executed in
>>> action class execute method. Is it possible to get the action name to
>>> which
>>> the action class is mapped to in the action classes execute method?
>>>
>>>
>>> *Thanks and Regards,*
>>> Muralidhar Yaragalla.
>>>
>>
>

Re: is there a way to get action name in the execute method?

Posted by Dale Newfield <da...@newfield.org>.
For the benefit of others in the future searching archives of this list 
for the answer to the same question, would you please describe your 
scenario and solution in another post?

-Dale

On 9/29/13 2:03 PM, Yaragalla Muralidhar wrote:
> I got the answer. Thanks.
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
>
> On Sun, Sep 29, 2013 at 11:22 PM, Yaragalla Muralidhar <
> yaragallamurali@gmail.com> wrote:
>
>> Hi for some reason i need to know the action name that is executed in
>> action class execute method. Is it possible to get the action name to which
>> the action class is mapped to in the action classes execute method?
>>
>>
>> *Thanks and Regards,*
>> Muralidhar Yaragalla.


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


Re: is there a way to get action name in the execute method?

Posted by Yaragalla Muralidhar <ya...@gmail.com>.
I got the answer. Thanks.

*Thanks and Regards,*
Muralidhar Yaragalla.
*
*


On Sun, Sep 29, 2013 at 11:22 PM, Yaragalla Muralidhar <
yaragallamurali@gmail.com> wrote:

> Hi for some reason i need to know the action name that is executed in
> action class execute method. Is it possible to get the action name to which
> the action class is mapped to in the action classes execute method?
>
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
> *
> *
>