cvc-complex-type.2.4.a: Invalid content was found starting with element
在写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的更多相关文章
- 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 ...
- 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 错误,还出现小红叉,在网上找 ...
- 【解决方案】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 ...
- 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" ...
- Invalid content was found starting with element 'taglib'”
今天在使用struts-menu制作菜单,在web.xml中写入 <taglib> <taglib-uri>/WEB-INF/struts-menu.tld</ ...
- 异常: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= ...
- 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 ...
- 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 ...
- 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 错误,还出现小红叉,在网上找 ...
随机推荐
- PHP的cURL库:抓取网页,POST数据及其他,HTTP认证 抓取数据
From : http://developer.51cto.com/art/200904/121739.htm 下面是一个小例程: ﹤?php// 初始化一个 cURL 对象$curl = curl_ ...
- 对 HTTP 304 的理解
最近和同事一起看Web的Cache问题,又进一步理解了 HTTP 中的 304 又有了一些了解. 304 的标准解释是: Not Modified 客户端有缓冲的文档并发出了一个条件性的请求(一般是提 ...
- ueditor-百度编辑器插件
1.官网地址:http://ueditor.baidu.com/website/index.html 2.定制化工具栏:(1)修改ueditor.config.js的toolsbar(2)在创建编辑器 ...
- 切换PS工具栏里的快捷键
工具箱(多种工具共用一个快捷键的可同时按[Shift]加此快捷键选取,可以在[常规]'快捷键[Ctrl]+[k]'里设置是否使用[Shift]切换) 其它快捷键: 矩形.椭圆选框工具[M] 裁剪工具[ ...
- android学习——MeasureSpec介绍及使用
一.MeasureSpc类说明 SDK的介绍:MeasureSpc类封装了父View传递给子View的布局(layout)要求.每个MeasureSpc实例代表宽度或者高度 它有三种模式:①.UNSP ...
- Lists
List类主要提供了对List类的子类构造以及操作的静态方法.在类中支持构造ArrayList.LinkedList以及newCopyOnWriteArrayList对象的方法.其中提供了以下构造Ar ...
- 多数据源问题--Spring+Ibatis 访问多个数据源(非分布式事务)
有的时候,我在一个工程中需要访问两个以上的数据源,尤其是在系统集成的时候,以下是我在系统集成的时候遇到的情况,我的工程的架构是:spring2.0+ibatis2.0+struts1.2. 数据库是o ...
- Oracle锁表(转载)
锁定类型 行级锁 表级锁行级锁 ---- 行被排他锁定 ----在某行的锁被释放之前,其他用户不能修改此行 ...
- 安装配置Apache
1.更新和升级系统 sudo apt-get update sudo apt-get upgrade 2.安装和配置apache 2.1.安装apache sudo apt-get install a ...
- jQuery需要掌握的技巧
检查 jQuery 是否加载 在使用 jQuery 进行任何操作之前,你需要先确认它已经加载: if (typeof jQuery == 'undefined') { console.log('jQu ...