java 后台给前台传值,html:select,html:text等加载页面显示默认值的方法
后台写
Java代码
1.request.setAttribute("dateCreated","黑色头发");
request.setAttribute("dateCreated","黑色头发");
前台接收:
html:text
Html代码
1.<html:text property="dateCreated" value="${dateCreated}" />
<html:text property="dateCreated" value="${dateCreated}" />
html:select
Html代码
1.<html:select property="accountsUser" value="${dateCreated}">
2. <html:option value="">--请选择用途--</html:option>
3.</html:select>