• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get value from a action variable in Struts2

 
manish krishnan
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Montgomery thanks..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic