为什么我使用struts的html:cancel标签后,在表单点击cancel后,页面交给action后为什么输入框里的内容的数据还是存在?
这是我的表单内容:
用户id/html:text
用户名/html:text
电子邮箱/html:text
/html:submit
/html:cancel
/html:form
这是我的配置文件:
attribute="userForm"
input="/WEB-INF/register.jsp"
name="userForm"
path="/reg"
scope="request"
type="com.snow.struts.action.RegAction"
cancellable="true"
>
这是我的action:
if(isCancelled(request)){
return mapping.findForward("fail");
}
求教该如何解决?为什么我使用struts的html:cancel标签后,在表单点击cancel后,页面交给action后为什么输入框里的内容的数据还是存在?
这是我的表单内容:
用户id/html:text
用户名/html:text
电子邮箱/html:text
/html:submit
/html:cancel
/html:form
这是我的配置文件:
attribute="userForm"
input="/WEB-INF/register.jsp"
name="userForm"
path="/reg"
scope="request"
type="com.snow.struts.action.RegAction"
cancellable="true"
>
这是我的action:
if(isCancelled(request)){
return mapping.findForward("fail");
}
求教该如何解决?