File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to get value from a action variable in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get value from a action variable in Struts2" Watch "How to get value from a action variable in Struts2" New topic
Author

How to get value from a action variable in Struts2

manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
Hi in struts2 how we can get value from the variable which i declared in action to jsp. for example in action i have done operation and assigned that value to a variable X, i want to know how get the value and display in jsp. please help me.
Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
Do you have a public getter and setter defined in your action for your action variable? The public getter is how your struts jsps obtain your action variables. The public setter is how your form submits fill that value.
manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
Chris Montgomery thanks..
 
Consider Paul's rocket mass heater.
 
subject: How to get value from a action variable in Struts2