Hi! I'm looking for a method in org.apache.struts.action.ActionMapping that returns the name of the action or jsp that has invoked my action (this action is the owner of the ActionMapping). Which is this method ?
thanks in advance, -- Eider On 7/11/06, Samere, Adam J <[EMAIL PROTECTED]> wrote:
The org.apache.struts.action.ActionMapping class provides access to this information. It is provided as the first parameter to the Action.execute method, and is also stored as a request attribute under the org.apache.struts.Globals.MAPPING_KEY key ("org.apache.struts.action.mapping.instance"). There may be a better way to do what you are attempting though... -----Original Message----- From: Bryce Nesbitt [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:05 PM To: user@struts.apache.org Subject: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ----------------------------------------- The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Paychex, Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]