!-- 拦截设置 -- servlet-mapping servlet-namedispatcherServlet/servlet-name url-pattern//url-pattern /servlet-mapping !-- /user/login是Controller中的方法 -- servlet-mapping servlet-namedispatcherServlet/servlet-name url-pattern/user
<!-- 拦截设置 -->
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- /user/login是Controller中的方法 -->
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/user/login</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>user/login</welcome-file></welcome-file-list>