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-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"], "http://www.springframework.org/schema/beans":beans}' is expected.
原因:没找到元素property,该元素应该用bean元素包裹
错误配置:
<!-- 视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" />
<!-- 前缀 -->
<property name="prefix">
<value>/WEB-INF/content/</value>
</property>
<!-- 后缀 -->
<property name="suffix">
<value>.jsp</value>
</property>
正确配置:
<!-- 视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<!-- 前缀 -->
<property name="prefix">
<value>/WEB-INF/content/</value>
</property>
<!-- 后缀 -->
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
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 'init-param'.
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...
- 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 错误,还出现小红叉,在网上找 ...
- 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 ...
- 【解决方案】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 ...
- 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 ...
- 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 'async-supported'. One of '{"http://java.sun.com/xml/ns/javaee":init-param}' is expected.
第一种方案: 将 "http://java.sun.com/xml/ns/javaee" 换为 "http://java.sun.com/xml/ns/j2ee& ...
- struts2 ,web.xml中配置为/*.action,运行报错Invalid <url-pattern> /*.action in filter mapp
首先,修改成: <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/ ...
- web.xml在<init-param>一个错误
Description ResourcePathLocationType cvc-complex-type.2.4.a: Invalid content was found starting with ...
随机推荐
- java中文乱码解决之道(七)—–JSP页面编码过程
我们知道JSP页面是需要转换为servlet的,在转换过程中肯定是要进行编码的.在JSP转换为servlet过程中下面一段代码起到至关重要的作用. <%@ page language=" ...
- 数学--数论--HDU 2197 本原串 (推规律)
由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串? 答案mod2008. 例如,100100不是本原串,因为他是由两个 ...
- MySQL高级(十三)--- 表锁
前言:锁是计算机协调多个进程或线程并发访问某一资源的机制.在数据库中,除传统的计算机资源(如CPU.RAM.I/O等)的争用外,数据也是一种供许多用户共享的资源.如何保证数据并发访问的一致性.有效性是 ...
- HTML 页面跳转的五种方法
H方法TML 页面跳转的五种方法 下面列了五个例子来详细说明,这几个例子的主要功能是:在5秒后,自动跳转到同目录下的hello.html(根据自己需要自行修改)文件.1) html的实现 <he ...
- vue后台管理系统介绍
项目GitHub地址:https://github.com/Little-Orange7/cmms-vue 一.简介 很多公司稍微复杂一点的业务,基本上都需要后台管理系统,来对业务进行各个维度的统计. ...
- 最小点覆盖(König定理)
König定理是一个二分图中很重要的定理,它的意思是,一个二分图中的最大匹配数等于这个图中的最小点覆盖数.如果你还不知道什么是最小点覆盖,我也在这里说一下:假如选了一个点就相当于覆盖了以它为端点的所有 ...
- F. Multicolored Markers 暴力+二分
F. Multicolored Markers 题目大意: 给你 a个红块 b个蓝块 拼成一个实心矩形,并且要求红块或者蓝块自成一个矩形,问形成的这个矩形最小的周长是多少. #include < ...
- spring学习笔记(六)自定义spring-boot-starter(2)
上篇文章我们主要讲了spring自动装配的原理,我们知道了springboot在启动的时候会自动去读.factories文件,在factories文件中,autoConfiguration对应的就是我 ...
- AbstractList源码分析
AbstractList 1 类图 2 字段 // 默认容量 private static final int DEFAULT_CAPACITY = 10; // 共享的空数组 private sta ...
- 使用Pandas读取CSV文件
使用Pandas读取CSV文件 import pandas as pd csv_data = pd.read_csv('birth_weight.csv') # 读取训练数据 print(csv_da ...