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" ?>写到第一行,并且前面没有空格

  • 相关阅读:
    Live2d Test Env
    关于word2vec的一些问题
    排序链表
    最长回文子串
    前缀树
    验证回文串
    最大子序和/积
    构建知识图谱-初学
    HMM-维特比算法理解与实现(python)
    跨存储后台迁移数据的三种方案
  • 原文地址:https://www.cnblogs.com/shumengru/p/5158847.html
Copyright © 2011-2022 走看看