配置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, &…
问题与分析 在web.xml中配置servlet节点时报错如下: cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/j2ee":run-as, "http://java.sun.com/xml/ns/j2ee":security-role-ref}' is expected…
<?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.s…
在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找了很多,有说是把报红叉的代码写在<jsp-config></jsp-config>之间,试了之后发现完全没用. 后来在外文网站上找到了一个方法就把问题解决了 解决办法为:将“http://www.springmodules.org/schema/cache/springmodules-…
最近都在研究shiro这个框架,今天实施了一下,就报了如下错误: 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. 在web.xml中配置了一下shiro,就会报如上错误: 我的解决方案: 我原来web.xml的w…
[JAVA错误] 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 [错误源码] 在springmvc 配置过程中,配置web.xml…
项目突然间爆出了这样的问题: Description Resource Path Location Typecvc-complex-type.2.4.a: Invalid content was found starting with element 'build'. One of '{"http://maven.apache.org/POM/4.0.0":parent, "http://maven.apache.org/POM/4.0.0":name, "…
第一种方案:  将  "http://java.sun.com/xml/ns/javaee"  换为  "http://java.sun.com/xml/ns/j2ee" 错误,错误原因为   根元素<web-app>中的模式文件不对,javaee只支持单个的config,要换成 j2ee   经过测试,修改完还会报错. 第二种方案:直接将   xmlns="http://java.sun.com/xml/ns/javaee" xsi…
搭建ssm工程过程中web.xml报错:Servlet should have a mapping ....但是mapping已经配置好了...如下图: 搜索无果,后来发现是工程的web.xml位置配置错误,因为我之前换过根目录位置. 修改方法: 打开Project Structure界面,Modules>Web>Deployment descriptor,修改正确的位置即可,如下图: 另:打开Project Structure的方法: Ctrl+Alt+Shift+S 除上述以外,一定要注意…
  报错信息:Attribute "xmlns" was already specified for element "web-app" 由于项目的重命名,出现了xmlns的重复赋值,这可能是eclipse自己设定的一种方式,重新为项目匹配合适的配置.   <web-app xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”  xmlns=”http://java.sun.com/xml/ns/javae…