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. vs 2012安装ASP.NET MVC5

    VS2012能使用MVC5开发,但VS2012不自带MVC5,需要安装“用于 Visual Studio 2012 的 ASP.NET 和 Web 工具 2013.1” 从下面提供的链接下载安装: h ...

  2. 常用字符串匹配算法(brute force, kmp, sunday)

    1. 暴力解法 // 暴力求解 int Idx(string S, string T){ // 返回第一个匹配元素的位置,若没有匹配的子串,则返回-1 int S_size = S.length(); ...

  3. 解决Spellchecker inspection helps locate typos and misspelling in your code

    idea出现这个是因为词库中没有这个单词,所以提示拼写错误 解决办法:双击下面有虚线的单词——>鼠标右键——>spelling——>save 'xxx' to distionary

  4. python 装饰器模拟京东登陆

    要求: 1.三个页面:主页面(home).书店(book).金融页面(finance)2.有两种登陆方式:主页面和书店页面使用京东账户登陆,金融页面使用微信账户登录2.输入:1 ,进入主页面,以此类推 ...

  5. 使用pymysql 操作MySQL数据库

    安装 pip install pymysql 注:连接前要有可使用的账户及有权限.可操作的数据库 先来一个栗子: import pymysql # 连接database conn = pymysql. ...

  6. 大数据学习——linux常用命令(三)

    三 文件操作 1创建文件 touch somefile.txt 创建一个空文件somefile.txt > 重定向操作符 echo "woshiwoa"> some.t ...

  7. irules事件和命令

  8. [luoguP1119] 灾后重建(Floyd)

    传送门 基于Floyd的动态规划原理,我们可以只用进行一次Floyd. 而题目给出的限制条件相当于给Floyd加了时间限制而已. 还是得靠对Floyd的理解. ——代码 #include <cs ...

  9. bzoj4568 [Scoi2016]幸运数字 线性基+树链剖分

    A 国共有 n 座城市,这些城市由 n-1 条道路相连,使得任意两座城市可以互达,且路径唯一.每座城市都有一个 幸运数字,以纪念碑的形式矗立在这座城市的正中心,作为城市的象征.一些旅行者希望游览 A ...

  10. Linux(5):正则表达式 & 权限

    正则表达式: 特殊符号: '' ---> 所见即所得,里面的内容都会被原封不动的输出出来 "" ---> 与单引号类似,但其中的特殊符号会被解析运行 `` ---> ...