每次在提交表单中的数据后,就一片空白了, 连原来的表单都没有了,不知道是什么原因,请各位指教,谢谢!!!struts-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config>
<data-sources />
<form-beans >
<form-bean name="regForm" type="com.mine.struts.form.RegForm" />
</form-beans>
<global-exceptions />
<global-forwards >
<forward name="failure" path="/reg.jsp" />
<forward name="success" path="/index.jsp" redirect="true" />
</global-forwards> <action-mappings >
<action
attribute="regForm"
input="/reg.jsp"
name="regForm"
path="/reg"
scope="request"
type="com.mine.struts.action.RegAction" />
</action-mappings>
<message-resources parameter="com.mine.struts.ApplicationResources" />
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>validation.xml<form-validation>
<!-- ========== Default Language Form Definitions ===================== -->
<formset>
<form name="regForm">
<field property="username" depends="required">
<arg0 key="prompt.username" />
</field>
<field property="password" depends="required">
<arg0 key="prompt.password" />
</field>
</form>
</formset>
</form-validation>
ApplicationResources.propertieserrors.required={0} 不能为空!
errors.minlength={0} 不能少于 {1} 字符
errors.maxlength={0} 不能多与 {1} 字符
errors.email={0} 不是有效的邮箱地址
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config>
<data-sources />
<form-beans >
<form-bean name="regForm" type="com.mine.struts.form.RegForm" />
</form-beans>
<global-exceptions />
<global-forwards >
<forward name="failure" path="/reg.jsp" />
<forward name="success" path="/index.jsp" redirect="true" />
</global-forwards> <action-mappings >
<action
attribute="regForm"
input="/reg.jsp"
name="regForm"
path="/reg"
scope="request"
type="com.mine.struts.action.RegAction" />
</action-mappings>
<message-resources parameter="com.mine.struts.ApplicationResources" />
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>validation.xml<form-validation>
<!-- ========== Default Language Form Definitions ===================== -->
<formset>
<form name="regForm">
<field property="username" depends="required">
<arg0 key="prompt.username" />
</field>
<field property="password" depends="required">
<arg0 key="prompt.password" />
</field>
</form>
</formset>
</form-validation>
ApplicationResources.propertieserrors.required={0} 不能为空!
errors.minlength={0} 不能少于 {1} 字符
errors.maxlength={0} 不能多与 {1} 字符
errors.email={0} 不是有效的邮箱地址
解决方案 »
- 数字转换问题
- 这个错误时什么意思啊?关于注释的。
- Swing线程问题
- a[]={0,1,2,3,3,3,4,4,2,5} 实现方法public String web(int a[]){} 得出数量最多的那个数
- jsp写入sql server乱码问题
- java源代码编译后怎么有时候生成多个class文件??
- 怎么用正则表达式判断一个字符串中有指定字符???
- 问一个关于jPopupMenu的基础问题,进者有分!
- wing$1.class和wing.class关系
- 大一新生求助!!
- 帮忙解释下一个句话~~~
- 用Integer.parseInt(JOptionPane.showInputDialog就把DOS卡住了
没有开始标签,而且你也没有设定error画面,你把error画面设定好就不会空了
<exception
key="*****"
handler="*******"
type="*******"
path="******.jsp"/>
</global-exceptions>
注:***的部分你自己改吧!