This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Need value from <s:property> to JSP variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need value from <s:property> to JSP variable" Watch "Need value from <s:property> to JSP variable" New topic
Author

Need value from <s:property> to JSP variable

Kanishka Ajwani
Ranch Hand

Joined: Nov 30, 2009
Posts: 62
I have a JSP which uses liferay tabs to display data from three action forms.

My problem is how to display the correct data in the correct tab. For this, I have a "currentTab" property in each of the action classes, which has the name of the tab to be displayed as current. ( I am using struts2)
In the JSP, this gives me the correct value from action class.


But I want to assign this value to a JSP variable so that I can tell liferay which tab to display, something like:


I know I can use OGNL/EL for assigning value from <s:property> to a JSP variable, but since I have three action classes using the same JSP, I am not sure how to use it.

Any help is appreciated greatly. Thanks.
 
jQuery in Action, 2nd edition
 
subject: Need value from <s:property> to JSP variable