在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找了很多,有说是把报红叉的代码写在<jsp-config></jsp-config>之间,试了之后发现完全没用。
后来在外文网站上找到了一个方法就把问题解决了
在eclipse中配置xmlcatalog
1、 Location: D:\eclipse3.3\springmodules-cache.xsd (springmodules-cache.xsd在本地的路径)
Key Type: Namespace Name
Key: http://www.springmodules.org/schema/cache/springmodules-cache.xsd
2、Location: D:\eclipse3.3\springmodules-ehcache.xsd(本地路径)
Key Type: Schema Location
Key: http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd
然后再将这连个xsd加入到web.xml中就搞定了

<?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</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/oswf</res-ref-name>
<res-type>javax.sql.DataSource</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>

cvc-complex-type.2.4.a: Invalid content was found starting with element的更多相关文章

  1. Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'build'.错误的解决方法

    项目突然间爆出了这样的问题: Description Resource Path Location Typecvc-complex-type.2.4.a: Invalid content was fo ...

  2. cvc-complex-type.2.4.a: Invalid content was found starting with element ‘init-param’(转)

    在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找 ...

  3. 【解决方案】cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/xml/ns/javaee":security-role-r

    [JAVA错误] cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One o ...

  4. web.xml文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'.

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...

  5. Invalid content was found starting with element 'taglib'”

    今天在使用struts-menu制作菜单,在web.xml中写入 <taglib>      <taglib-uri>/WEB-INF/struts-menu.tld</ ...

  6. 异常:cvc-complex-type.2.4.a: Invalid content was found starting with element

    web.xml 出现cvc-complex-type.2.4.a: Invalid content was found starting with element <web-app xmlns= ...

  7. shiro中async-supported报错 cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/ javaee":init-param}' is expected.

    最近都在研究shiro这个框架,今天实施了一下,就报了如下错误: cvc-complex-type.2.4.a: Invalid content was found starting with ele ...

  8. cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{&qu ...

  9. web.xml报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/javaee":init-param}' is expected.

    在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找 ...

随机推荐

  1. AJAX异步调用

    前台: function readygo(v) {            $.ajax({                type: "post",                ...

  2. 嵌入式 arm平台ping域名指定ip小结

    在fs的目录/etc/下添加文件hosts,然后内容修改如下: 192.168.11.12 qycam.com ping qycam.com 解析为192.168.11.12

  3. Collectl基础

    Collectl比nmon更专业和深入的linux性能测试工具 首先是安装 $ sudo apt-get install collectl 直接输入collectl就可以看到数据 默认是CPU,硬盘, ...

  4. bzoj1391 最大权闭合子图(also最小割、网络流)

    一道裸的最小割的题,写一下只是练练手. 表示被卡M,RE不开心.一道裸题至于吗? 再次复习一下最大权闭合子图: 1.每一个点若为正权,与源点连一条容量为绝对值权值的边.否则连向汇点一条容量为绝对值权值 ...

  5. uoj #58. 【WC2013】糖果公园(树上莫队算法+修改操作)

    [题目链接] http://uoj.ac/problem/58 [题意] 有一棵树,结点有自己的颜色,若干询问:u,v路径上的获益,并提供修改颜色的操作. 其中获益定义为Vc*W1+Vc*W2+…+V ...

  6. Metasploit启动

    一.启动Kali的PostgreSQL服务 由于使用PostgreSQL作为数据库,因此,必须先运行它. root@kali:~# service postgresql start 使用ss -ant ...

  7. 高效使用STL

    高效使用STL  参考:http://blog.jobbole.com/99115/ 仅仅是个选择的问题,都是STL,可能写出来的效率相差几倍:熟悉以下条款,高效的使用STL: 当对象很大时,建立指针 ...

  8. log4net--帮助程序员将日志信息输出到各种目标(控制台、文件、数据库等)的工具

    1. log4net库是Apache log4j框架在Microsoft .NET平台的实现,是一个帮助程序员将日志信息输出到各种目标(控制台.文件.数据库等)的工具. 2. Log4net的结构如下 ...

  9. 移动开发必备!15款jQuery Mobile插件

    移动互联网的发展,来自PC端的网页并不能完全自适应移动端页面需求,使得响应式设计体验产生并成为潮流,也正是这样一种需求,促成了jQuery Mobile的流行.jQuery Mobile这样一款基于j ...

  10. MySQL Connector_J_5.1.34_2014.10

    5.1版本符合JDBC3.0和JDBC4.0规范 跟MySQL4.1-5.7兼容 5.1.21以后支持JDK7的JDBC4.1规范 在MySQL4.1之前,是不支持utf8的 com.mysql.jd ...