This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Passing parameter from Action class to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing parameter from Action class to JSP" Watch "Passing parameter from Action class to JSP" New topic
Author

Passing parameter from Action class to JSP

Randy Alexander
Greenhorn

Joined: Jun 01, 2009
Posts: 5
New to Struts2

What is the best way to pass a parameter from a Struts2 action class to a JSP?

Should we use parameterAware or requestAware? How would we read it in the JSP?


Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Neither, create an action (or model, if using ModelDriven) property with a publicly-accessible getter.

${theProperty}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Passing parameter from Action class to JSP
 
Similar Threads
migration to Struts2
Struts2 iterator
Working with Struts2
Struts2 : Problem in redirecting From other site to myApplication
struts2