SixFeet Under
2021-06-02 11:03
采纳率: 100%
浏览 179

不懂就问,maven构建springmvc项目 报错servlet标记为不可用

今天遇到一个报错:servlet 标记为不可用,各位大佬帮帮我这个小白吧

报错信息:

 

web配置:
 

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">

    <servlet>
        <servlet-name>mySpring</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:springmvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>mySpring</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

</web-app>

4条回答 默认 最新

相关推荐 更多相似问题