Good day!
I am reading a book by Manning struts2 and one of the topics accesses a static variable using OGNL using the syntax @[fullClassName]@[property or methodCall]
so I tried this in my program and my code looks like this:
BEAN:
public class ContactsBean { private static int count = 1;
ACTION:
private ContactsBean contacts;
JSP:
<s:property value="@com.demo.bean.ContactsBean@count" /> or <s:property value="@vs@count" /> //valuestack method
but that will not work. Am I missing something? Thanks.
java-ee struts2 ognl
newbie
source share