Ngan Ly Ngan Ly - 20 days ago 8
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

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.

Comments