I am trying to access the value of the variable defined in the method in the action class in jsp using Struts2.
I have a variable defined desc_map in the method of the action class.I want to access the value of this in jsp.
How can I do it?
Thank you.
I am trying to access the value of the variable defined in the method
Share
Create a public getter for the property, preferably named correctly as per the JavaBean spec:
Access it from the JSP:
Or if you need escaping, can’t use JSP 2.0+, etc:
All of this is covered in essentially every Struts 2 tutorial.