<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<servlet>
<servlet-name>et1904</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>et1904</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
</web-app>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.etoak.et1904.springmvc</groupId>
<artifactId>springmvc-01</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- spring mvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
</dependencies>
<build>
<finalName>springmvc-01</finalName>
</build>
</project>
光有写了以上两个配置文件就会报这样的错
spring mvc 流程
1.客户端发送 /hello.acton 到DispatcherServlet ,DispatcherServlet请求处理器映射器查找处理器;
2.处理器映射器根据请求的url(/hello.action)查找处理器,查找之后,返回一个HandlerExecutionChain的对象给DispatcherServlet;
注:HandlerExecutionChain包含一组拦截器和Object类型的处理器(控制器)
3.DispatcherServlelt请求处理器是配置执行处理器
4.处理器执行完成之后,返回一个ModelAndView对象给处理器适配器;
5.处理器适配器将ModelAndView返回给DispatcherServlet;
6.DispatcherServlet请求视图解析器解析逻辑视图ModelAndView;
7.视图解析器解析完成之后,返回一个View对象;
8.DispatcherServlet使用模型数据和view 对象来渲染视图
9.返回给客户端