You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bryce Nesbitt <br...@obviously.com> on 2006/07/11 20:05:17 UTC

How to get the action name (in addition to the context path name)?

>From within a struts 1.0 jsp, how can I find the name of the action that
invoked me?
I can find the context path easy enough:
         <%= request.getContextPath().toString() %>
And the name of the .jsp that I'm in:
          <%= request.getRequestURL() %>
But where is the action name hidden?
   

I'm trying to recycle code from two actions:
     <action name="rezForm" path="/admin/changeFoo"
     <action name="rezForm" path="/member/changeFoo"

The .jsp's that implement the views are identical except for the
<html:form>:
    <html:form action="/admin/changeFoo">
    <html:form action="/admin/changeFoo">

So I'd like to have them share the same code, and just insert the
invoking action name.
Can this be done?

-- 
----
Visit http://www.obviously.com/


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