Ngan Ly Ngan Ly - 1 year ago 93
Java Question

Struts 2 call param with java

I have this code:

String param = "This my value";
<s:hidden name="hdd" value='<%=param%>' />

I want to call param variables, but it does not work.

Answer Source

Is the param defined on JSP page? If it is, try the html tag " />, but not struts2 tag . The struts2 tag will fetch it's value from OGNL stack according to it's name.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download