在第4步之前,在action中写:
request.setAttribute("username",用户名的值);
request.setAttribute("password",用户密码的值);然后,在index.jsp中写:
<bean:write name="username"/>
<bean:write name="password"/>
request.setAttribute("username",用户名的值);
request.setAttribute("password",用户密码的值);然后,在index.jsp中写:
<bean:write name="username"/>
<bean:write name="password"/>
我这样写,错了。但是我想知道我这种方法行不行?
然后action中用set()把属性设置
页面上就可以用Struts标签了<bean:write name="struts配置文件中对应的form" property="在form中的属性名"/>如果调试出来记得给我JF