like Jason said they way i do it is writing a getter method in my action say getActionName() then in it i do ActionContext.getContext().getName()
dunno if there is a better way because i have been doing this since the beginning of Struts2 or even Webwork time On Sun, May 29, 2011 at 10:48 AM, <[email protected]> wrote: > The reason is that I have JSP which contains a form that it's used for the > creation and modificatio of records. Depending on the name of the action, it > is a creation (in which certains field should be modifiable) or a > modification (in which those certains fields should be radonly). I was > hoping to be able to do that using Struts2 tags, that's why I need to get > the name of the action. > Sent via BlackBerry from T-Mobile > > -----Original Message----- > From: "Jason Pyeron" <[email protected]> > Date: Sat, 28 May 2011 22:39:08 > To: 'Struts Users Mailing List'<[email protected]> > Reply-To: "Struts Users Mailing List" <[email protected]> > Subject: RE: Access to ActionContext.getContext().getName() using OGNL > > > -----Original Message----- > > From: JOSE L MARTINEZ-AVIAL [mailto:[email protected]] > > Sent: Saturday, May 28, 2011 16:53 > > To: Struts Users Mailing List > > Subject: Access to ActionContext.getContext().getName() using OGNL > > > > Hi, > > I've been looking for a while, but haven't found anything, > > so I'm asking here. How can I get the name of the action from > > a Struts2 Tag? IOW, I would like to do something like > > ActionContext.getContext().getName(), but using <s:property > > Why (so I can help better)? > > > value="name"/>. > > While this is not an answer to your question, this may help your (assumed) > end > goal. > > In the latest revision or release <= 2.1.6 The <s:url /> will create a link > to > the current action. > > > > I haven't found any information on how to do that. > > > > If all else fails, kake a getter in your action. > > > Thanks > > > > Jose > > > > -Jason > > > -- > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > - - > - Jason Pyeron PD Inc. http://www.pdinc.us - > - Principal Consultant 10 West 24th Street #100 - > - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - > - - > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > This message is copyright PD Inc, subject to license 20080407P00. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

