zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    Jenkins安装2
    11月14 vagrant 虚拟机连接
    11月13 ssh 和 netstat
    Jenkins安装
    11月12号 springboot1.5 引入redis
    11月12号 用户登录输入密码错误达到指定次数后,锁定账户 004
    js模式-观察者模式
    立即执行函数
    vue 获取数据
    在登陆退出时候使用Vuex
  • 原文地址:https://www.cnblogs.com/it-mh/p/10552364.html
Copyright © 2011-2022 走看看