OK, so by just using: ${myValue}
The myValue property of the Action class will be accessed? I suppose this works as long as there aren't other "myName" properties in the other scopes, right? I take it that Struts2 essentially exposes the action as another scope to JSP EL? Thank you! -----Original Message----- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 29, 2008 11:05 AM To: Struts Users Mailing List Subject: Re: Accessing the Struts2 Action in a JSP via tags --- "Asleson, Ryan" <[EMAIL PROTECTED]> wrote: > Assume that I'm on a JSP that has been rendered with a Struts2 Action. > Somehow I want to access the Action and its properties via a JSP tag, > something like this: > > <c:out value="${action.myValue}" /> > > What is the correct way to do this? Is the Struts 2 Action placed on > the request using a specific name, or is it available via OGNL? If > so, how do I access it? Short answer: ${myValue} Long answer: The S2 request wrapper provides a way for JSP EL to access stack context objects. You can also use the S2 property tag. <s:property value="myValue"/> Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]