首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

struts1 form表单填充有关问题

2012-01-24 
struts1 form表单填充问题我从后台传了一个form希望能把值传到jsp页面 input typetext id ids val

struts1 form表单填充问题
我从后台传了一个form希望能把值传到jsp页面 <input type="text" id = "ids" value="${form.creditsubjectname}"/>
还是<input type="text" id = "ids" value="${creditsubjectname}"/> 貌似都不行 
WhiteListForm wf = (WhiteListForm)form;(creditsubjectname是WhiteListForm 里面的属性)
没用过struts1求指教

[解决办法]
我也没用过struts1 不过我觉得struts1应该有自己的标签吧 去找找应该很容易的
[解决办法]
如果你传的是form 这样写

HTML code
 <input type="text" id = "ids" value="${form.creditsubjectname}"/>
[解决办法]
要把后台取得的数据放到Request或session中,一般都是放到Request中,这样才能在jsp中取得数据。

request.setAttribute("form", wf);


<input type="text" id = "ids" value="${form.creditsubjectname}"/>

热点排行