From you JSP file.public class YourAction extends ActionSupport{ // NOTE to public this data so you can access in JSP public String name="Winzter"; public String getName() { return this.name; } } // class
NOTE:${action.getName()} in only working on Tomcat7.x.x.<c:out value="${action.getName()}" escapeXml="false"></c:out>If the property name was declare public, you can access by this one.<c:out value="${name}" escapeXml="false"></c:out>
No comments:
Post a Comment