I\'m a Struts2 newbie. I\'m using Struts2 with the typical datamodel UserItem inside an Action. The datamodel doesn\'t look good when using with the Struts ta
For Static Method Access you must need to add following constant in your struts.xml file.
Example: struts.xml:
/WEB-INF/JSP/sample.jsp
Then from your JSP you can access it in various ways:
Example - 1:
Output :
Where,
vaannila = Package Name.SampleAction = Class Name.getSTR() = Method Name.Example - 2:
Output :
Where,
vs = Value Stack.getSTR() = Method Name.Example - 3:
Output :
where,
STR = STR is declared and initialized as Static String with getter and setter method in your Java Class