zoukankan      html  css  js  c++  java
  • xml异常

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd">
    <struts>
    <constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <constant name="struts.devMode" value="true" />
    <!-- 创建一个default包,继承自Struts 2的struts-default包 -->
    <package name="default" namespace="/" extends="struts-default">
    <!-- 接收处理用户的/helloWorld.action请求,并根据返回结果,完成跳转 -->
    <default-action-ref name="index" />

    <global-results>
    <result name="error">/error.jsp</result>
    </global-results>

    <global-exception-mappings>
    <exception-mapping exception="java.lang.Exception"
    result="error" />
    </global-exception-mappings>

    <action name="index">
    <result type="redirectAction">
    <param name="actionName">HelloWorld</param>
    <param name="namespace">/example</param>
    </result>
    </action>
    </package>

    <include file="example.xml" />

    <!-- Add packages here -->

    </struts>

    错误提示:2016-1-25

    The processing instruction target matching "[xX][mM][lL]" is not allowed.

    可能原因:1.是空格的问题,把空格去掉就可以了

         2.可以是要求必须写在第一行

           3.<?xml version="1.0" encoding="UTF-8" ?>这句话有时候也区分大小写

    解决方案:我自己是把<?xml version="1.0" encoding="UTF-8" ?>写到第一行,并且前面没有空格

  • 相关阅读:
    752.打开转盘锁
    733. 图像渲染
    704.二分查找
    leetcode 87 Scramble String
    找实习总结
    leetcode 44 Wildcard Matching
    Linux,网络编程接口记录
    leetcode 172 Factorial Trailing Zeroes
    leetcode 168 Excel Sheet Column Title
    leetcode 65 Valid Number
  • 原文地址:https://www.cnblogs.com/shumengru/p/5158847.html
Copyright © 2011-2022 走看看