jusescn 发表于 2013-2-6 08:41:06

action中forward的redirect="true"问题

由于dispatch不能够访问web-inf下面文件,当如此配置时<forward name="edit" path="/WEB-INF/jsp/user/userForm.jsp" redirect="true"/>,页面无法访问
解决方法:
1、令建立action <action path="/reg" forward="/WEB-INF/jsp/user/userForm.jsp"></action>
修改<forward name="edit" path="/reg.do" redirect="true"/>
2、在action类中清空form的东西,如果采用传统的actionform继承,form.rest()应该就可以了。
采用LazyValidatorForm的话,可以((LazyValidatorForm)form).getMap().clear().
页: [1]
查看完整版本: action中forward的redirect="true"问题