在写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. devexpress GridControl 行指示列图标绘制

    Row Indicator Panel The row indicator panel represents a region displayed at the left edge of the Vi ...

  2. (win+linux)双系统,删除linux系统的条件下,删除grub引导记录,恢复windows引导

    //(hdx,y) (显示查找到的分区号)第一个数字指第几个硬盘,第二个指第几个分区.   一般我们是(hd0,0) \n Linux的分区已经被你从Windows中删除,系统启动后停在“grub&g ...

  3. 自定义View(三)--实现一个简单地流式布局

    Android中的流式布局也就是常说的瀑布流很是常见,不仅在很多项目中都能见到,而且面试中也有很多面试官问道,那么什么是流式布局呢?简单来说就是如果当前行的剩余宽度不足以摆放下一个控件的时候,则自动将 ...

  4. 讲解HTML服务器推送相关技术知识(转)

    1. 为什么需要服务器推送? 最大的优点:实时 健康知识平台重庆男科医院 重庆妇科医院适用场景:实时股票价格.商品价格.实时新闻.Twitter/weibo timeline.基于浏览器的聊天系统 2 ...

  5. nagios为监控图像添加图片

    1. 背景介绍 在监控web页面上显示主机都为问号,如下图所示: 本文的主要目的就是将监控的图片添加进去,让监控图像变得美观. 2. 图片的下载地址 图片的下载地址如下: https://exchan ...

  6. [转] 请别再拿“String s = new String("xyz");创建了多少个String实例”来面试了吧

    这帖是用来回复高级语言虚拟机圈子里的一个问题,一道Java笔试题的. 本来因为见得太多已经吐槽无力,但这次实在忍不住了就又爆发了一把.写得太长干脆单独开了一帖. 顺带广告:对JVM感兴趣的同学们同志们 ...

  7. Java NIO 操作总结

    问题: 1.Java NIO 出现大量CLOSE_WAIT或TIME_WAIT的端口无法释放 CLOSE_WAIT: 参考:http://my.oschina.net/geecoodeer/blog/ ...

  8. dom 按着shift多选

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  9. mysql系统表加trigger和对特定的库禁用 DDL 语句

    给 mysql 系统表加上 trigger 1 Reply 默认情况下,mysql 是不能给系统表,例如 mysql.user 加上触发器的.会提示 ERROR 1465 (HY000): Trigg ...

  10. HDU 2516 取石子游戏(FIB博弈)

    取石子游戏 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...