• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameter from Action class to JSP

 
Randy Alexander
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither, create an action (or model, if using ModelDriven) property with a publicly-accessible getter.

${theProperty}
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic