xxx-validation.xml 文件里  java.io.FileNotFoundException:
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd错误:

这个问题在struts2.3.x中会常常出现。原因就是http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd,这个url已经过时了。opensymphony这个组织貌似已经停止运营了,但其基本的开源项目。也都基本找到了新东家,比方struts交由Apache来运营了,以下这个写法是没有问题的。用新的dtd文件就能够了~

<?xml version="1.0" encoding="UTF-8"?

>
<!DOCTYPE validators PUBLIC 
"-//Apache Struts//XWork Validator 1.0.2//EN" 
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> 
  1. <validators>
  2. <!-- 加入对username的校验 -->
  3. <field name="user.username">
  4. <field-validator type="requiredstring">
  5. <param name="trim">true</param>
  6. <message>username不能为空</message>
  7. </field-validator>
  8. <field-validator type="regex">
  9. <param name="expression"><![CDATA[(\w{6,16})]]></param>
  10. <message>username输入不合法,必须为长度在6~16中间的数字或字母</message>
  11. </field-validator>
  12. </field>
  13. <!-- 加入对password的校验 -->
  14. <field name="user.password">
  15. <field-validator type="requiredstring">
  16. <param name="trim">true</param>
  17. <message>password不能为空</message>
  18. </field-validator>
  19. <field-validator type="regex">
  20. <param name="expression"><![CDATA[(\w{6,16})]]></param>
  21. <message>password输入不合法。必须为长度在6~16之间的数字或者字母</message>
  22. </field-validator>
  23. </field>
  24. </validators>

struts2 java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd的更多相关文章

  1. java.io.FileNotFoundException: D:\Program%20Files\Apache%20Software%20Foundation\Tomcat%205.0\webapp

    慢慢把以前遇到过的问题一点点发出来,以前做的笔记比较杂: java.io.FileNotFoundException: D:\Program%20Files\Apache%20Software%20F ...

  2. Caused by: java.io.FileNotFoundException

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  3. java.io.FileNotFoundException: antlr-2.7.7.jar (系统找不到指定的路径。)[待解决]

    严重: Failed to destroy the filter named [struts2] of type [org.apache.struts2.dispatcher.ng.filter.St ...

  4. java.io.FileNotFoundException: D:\xxx\yyy (拒绝访问。)问题

    File file=new File(fileAllName); FileWriter fw=new FileWriter(file); 在Java的 FileWriter 方法时 系统抛出了异常 j ...

  5. [Storm] java.io.FileNotFoundException: File '../stormconf.ser' does not exist

    This bug will kill supervisors Affects Version/s: 0.9.2-incubating, 0.9.3, 0.9.4 Fix Version/s: 0.10 ...

  6. cxf(3.1.1) 异常Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-soap.xml]

    Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-soap.xml] ...

  7. QA:java.lang.RuntimeException:java.io.FileNotFoundException:Resource nexus-maven-repository-index.properties does not exist.

    QA:java.lang.RuntimeException:java.io.FileNotFoundException:Resource nexus-maven-repository-index.pr ...

  8. log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: ..\logs\2010-1-19.log (系统找不到指定的路径。)

    log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: ..\logs\2010-1-19.log (系统找 ...

  9. 报错:java.io.FileNotFoundException: (系统找不到指定的路径。)

    报错如下: java.io.FileNotFoundException: E:\apache-tomcat-8.0.37\webapps\20161028-FileUpLoad\WEB-INF\fil ...

随机推荐

  1. RTSP详解

    关于 RTSP. RTSP协议是一个非常类似HTTP协议的流控制协议.它们都使用纯文本来发送信息,而且rtsp协议的语法也和HTTP类似.Rtsp一开始这样设计,也是为了能够兼容使用以前写的HTTP协 ...

  2. python 变量引用

    最近在看<<流畅的python>>关于变量引用部分时,有一些自己的看法,就再次记录一下. 问题: # From flunet python example 8-8 class ...

  3. 老男孩老师的博客地址 - 转自devops1992

    害怕他那天不让人看了,所以我就复制一份到我自己的博客里. http://www.bootcdn.cn/bootstrap/  bootstrap cdn在线地址 http://www.cnblogs. ...

  4. Python中 模块、包、库

    模块:就是.py文件,里面定义了一些函数和变量,需要的时候就可以导入这些模块. 包:在模块之上的概念,为了方便管理而将文件进行打包.包目录下第一个文件便是 __init__.py,然后是一些模块文件和 ...

  5. LeetCode(10) Regular Expression Matching

    题目 Implement regular expression matching with support for '.' and '*'. '.' Matches any single charac ...

  6. 【BZOJ 2462】矩阵模板 (二维哈希)

    题目 给定一个M行N列的01矩阵,以及Q个A行B列的01矩阵,你需要求出这Q个矩阵哪些在 原矩阵中出现过. 所谓01矩阵,就是矩阵中所有元素不是0就是1. 输入 输入文件的第一行为M.N.A.B,参见 ...

  7. 【NEFU 117 素数个数的位数】(素数定理)

    Description 小明是一个聪明的孩子,对数论有着很浓烈的兴趣. 他发现求1到正整数10n 之间有多少个素数是一个很难的问题,该问题的难以决定于n 值的大小. 现在的问题是,告诉你n的值,让你帮 ...

  8. python自定义模块导入方法,文件夹,包的区别

    python模块导入,网上介绍的资料很多,方法也众说纷纭.根据自己的实践,感觉这个方法最简单直接,而且可以与主流的python ide生成的工程是一样的. 规则只有三条 1.      严格区分包和文 ...

  9. zoj 2807 Electrical Outlets

    Electrical Outlets Time Limit: 2 Seconds      Memory Limit: 65536 KB Roy has just moved into a new a ...

  10. POJ-2386Lake Counting,搜索题。。

    Lake Counting Time Limit: 1000MS   Memory Limit: 65536K           Description Due to recent rains, w ...