Tag Archives: xsd

web.xml Solution of < async supported > true < / async supported > error in configuration file

I’m writing web.xml I always reported cvc-complex-type. 2.4. A: invalid content was found starting with element error again. I also found a small red cross. I found a lot of Red Cross on the Internet. It was said that I wrote the code of red cross between & lt; JSP config & gt; & lt; & JSP config & gt;, but it was useless after trying. Then I found a solution to the problem on the foreign language website

Solution 1:
configure XML in eclipse
1 http://www.springmodules.org/schema/cache/springmodules-cache.xsd
   2、 http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd
and then add these two xsds to the web.xml The code is as follows:

web.xml code

    <?xml version=”1.0″ encoding=”UTF-8″?>   < web-app version=”2.4″ xmlns=” http://java.sun.com/xml/ns/j2ee ”        xmlns:xsi= ” http://www.w3.org/2001/XMLSchema-instance    http://www.springmodules.org/schema/cache/springmodules-cache.xsd   http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd ”     xsi:schemaLocation= ” http://java.sun.com/xml/ns/j2ee    http://java.sun.com/xml/ns/j2ee/web-app_ 2_ 4.xsd”>       <!–OS Work Flow –>       <display-name>OSWorkflow Example App</display-name>       <description>OSWorkflow Example App</description>                <servlet>           <servlet-name>SOAPWorkflow</servlet-name>           < servlet-class>                com.opensymphony.workflow . soap.SOAPWorkflowServlet            </servlet-class>       </servlet>       <servlet>           <description>               This is the description of my J2EE component           < /description>           <display-name>               This is the display name of my J2EE component           </display-name>           <servlet-name>Osworkflow</servlet-name>           <servlet-class> net.caiban.servlet .Osworkflow</servlet-class>        </servlet>       <servlet>           <description>               This is the description of my J2EE component           </description>           <display-name>                This is the display name of my J2EE component           </display-name>           <servlet-name>DoWorkflow</servlet-name>           <servlet-class> net.caiban.servlet .DoWorkflow</servlet-class>       </servlet>       <servlet>            <description>               This is the description of my J2EE component           </description>           <display-name>               This is the display name of my J2EE component           </display-name>            <servlet-name>CreateWorkflow</servlet-name>           <servlet-class> net.caiban.servlet .CreateWorkflow</servlet-class>       </servlet>                   <servlet-mapping>           <servlet-name>SOAPWorkflow</servlet-name>            <url-pattern>/soap/*</url-pattern>       </servlet-mapping>          <servlet-mapping>           <servlet-name>Osworkflow</servlet-name>           <url-pattern>/servlet/Osworkflow</url-pattern>       </servlet-mapping>        <servlet-mapping>           <servlet-name>DoWorkflow</servlet-name>           <url-pattern>/servlet/DoWorkflow</url-pattern>       </servlet-mapping>       <servlet-mapping>           <servlet-name>CreateWorkflow</servlet-name>            <url-pattern>/servlet/CreateWorkflow</url-pattern>       </servlet-mapping>          <welcome-file-list>           <welcome-file> default.jsp&lt ;/welcome-file>           <welcome-file> index.jsp&lt ;/welcome-file>       </welcome-file-list>        <resource-ref>           <res-ref-name>jdbc/oswf</res-ref-name>           <res-type> javax.sql.DataSource&lt ;/res-type>           <init-param driverClassName=” com.mysql.jdbc .Driver” />           <init-param url=” jdbc:mysql :// localhost:3306/osworkflow ” />            <init-param user=”root” />           <init-param password=”123465″ />           <init-param max-connections=”20″ />           <init-param max-idle-time=”30″ />       </resource-ref>       <!–OS Work Flow –>   </web-app>  

Solution 2:

≪ async supported & gt; true & lt;/async supported & gt; yes web.xml 3.0, just add

<web-app xmlns:xsi= ” http://www.w3.org/2001/XMLSchema-instance ” xmlns=” http://Java.sun.com/xml/ns/javaee ” xsi:schemaLocation= ” http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_ 2_ 5.xsd” id=”WebApp_ ID” version=”2.5″>

Change to:

<web-app xmlns:xsi= ” http://www.w3.org/2001/XMLSchema-instance ” xmlns=” http://java.sun.com/xml/ns/javaee ” xsi:schemaLocation= ” http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_ 3_ 0.xsd” id=”WebApp_ ID” version=”3.0″>

It can be solved.

Original address: http://blog.csdn.net/zxz547388910/article/details/50780068