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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to get value from a action variable in Struts2
 
Similar Threads
Struts2 CRUD - Edit - it is not displaying the value in JSP.
migration to Struts2
struts2
Struts2 iterator
Struts2 variable inside javascript