JSPX scriplet inside HTML input type textbox
I have the following in my jspx file:
<jsp:scriplet>
int myvar = 2;
</jsp:scriptlet>
How can I 开发者_JAVA百科put variable myvar into a textbox (id=myinput) value using JSTL or scriptlet (I can do this using session variable)
<input type="text" id="myinput" value="...the value of myvar..."/>
Thanks
<input type="text" id="myinput" value="<%=myvar%>"/>
Just a little typo in previous answer. Please use like this
<input type="text" id="myinput" value="<%=myvar%>"/>
精彩评论