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"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
报错的servlet
节点
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:config/spring-servlet.xml</param-value>
</init-param>
</servlet>
报错提示在第6行
错误提示内容:
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-ref, "http://java.sun.com/xml/ns/javaee":multipart-config}' is expected.
解决方法:
把4,5行放到9,10行之间,代码如下
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:config/spring-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
web.xml文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'.的更多相关文章
- 新导入的eclipse项目报错,找不到java包,找不到web.xml文件报错。
新导入的项目可能会出现报错,特别是web项目.我这里提供一种解决方法: 1.右击项目,选择“属性” 2.选择 Resource->java build path->libraries 图中 ...
- web.xml文件报错:The processing instruction target matching "[xX][mM][lL]" is not allowed.
昨晚把我的项目上传到了gitlab,然后今天在公司从gitlab下载下来, 发现web.xml报错.
- 异常-----web.xml文件报错 Multiple annotations found at this line: - cvc-complex-type.2.4.b: The content of element 'welcome-file-list' is not complete. One of '{"http://java.sun.c
1,检查抬头是不是有问题. <?xml version="1.0" encoding="UTF-8"?><web-app version=&q ...
- web.xml——Error: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 详细报错信息:cvc ...
- web.xml报错:Invalid content was found starting with element 'init-param'
问题与分析 在web.xml中配置servlet节点时报错如下: cvc-complex-type.2.4.a: Invalid content was found starting with ele ...
- maven 的 pom.xml 文件报错:ArtifactTransferException: Failure to transfer
因为maven下载依赖jar包时,特别慢,所以取消了下载过程,再次打开eclipse时,maven的pom.xml文件报错如下: ArtifactTransferException: Failure ...
- 解决:eclipse导入android时工程下没有R文件的问题,以及style.xml文件报错
解决:eclipse导入android时工程下没有R文件的问题,以及style.xml文件报错
- Maven-pom.xml文件报错 Plugin execution not covered by lifecycle configuration
问题: Eclipse中新导入的项目pom.xml文件报错: Plugin execution not covered by lifecycle configuration: org.jacoco:j ...
- spring框架中beans.xml文件报错XmlBeanDefinitionStoreException
第一次构建spring,实现简单的注入方式,就发生了beans.xml文件报错,报错信息如下图 org.springframework.beans.factory.xml.XmlBeanDefinit ...
随机推荐
- How to manage the certificates in the PC
1.open Run command. 2.enter 'mmc' . 3.Click File, and Add or Remove Snap-in. 4.Select Certificates, ...
- 与众不同 windows phone (48) - 8.0 其它: C# 调用 C++
[源码下载] 与众不同 windows phone (48) - 8.0 其它: C# 调用 C++ 作者:webabcd 介绍与众不同 windows phone 8.0 之 其它 C# 中调用 W ...
- Servlet3.0 Test
1. Servlet3.0 Test and Annotation used 你可以从tomcat7中lib文件夹中找到servlet-api.jar package com.goodfan.serv ...
- 爱你.一万年>>数据库基础
嗨!最近学习了一项新的技能,学习了数据库的知识,在这里抛砖引玉,给大家说说,望赐教!!>> 01.首先给大家谈谈为什么要使用数据库? 数据库可以看成是一个永久保存数据的仓库. 可以存储大量 ...
- SharePoint DateTimeControl 使用
首先,需要引用: <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebCo ...
- iphone 使用 soap 服务 介绍
iphone 使用 soap 服务 介绍 目前比较常用的有几个办法: 1. WSDL to Objective C自动根据wsdl文件生成ios可以直接调用的Objective-C (Cocoa) 代 ...
- Android项目实战(三):实现第一次进入软件的引导页
最近做的APP接近尾声了,就是些优化工作了, 我们都知道现在的APP都会有引导页,就是安装之后第一次打开才显示的引导页面(介绍这个软件的几张可以切换的图) 自己做了一下,结合之前学过的 慕课网_Vie ...
- Purchase购物车实例分析
源代码下载地址:http://code4app.com/ios/55655def933bf09d328b5141 此源代码从中学到以下四个知识点 第一:关于右边只有一个被选中的效果展现,左边部分代码内 ...
- iOS扫一扫功能开发
之前很多二维码扫描都是基于zxing做的,但是zxing用起来真的很麻烦,又一直不更新.随着iOS6退出历史舞台,终于可以使用iOS7以后,用系统的AVFoundation做的二维码扫描器了. 初始化 ...
- CFStringTransform
Mattt Thompson撰写. Ricky Tan翻译. 发布于2012年8月6日关于一种语言好不好用,你只需要衡量以下两种指标: API 的统一性String 类的实现质量NSString 是基 ...