SpringMVC can be used for restful links. Very convenient 1. web. xml [html] <? Xml version = "1.0" encoding = "UTF-8"?> <Web-app xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: web = "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id = "WebApp_ID" version = "2.5"> <display-name> 01_spring_mvc </display-name> <! -- SpringMVC 1. Create a servlet --> <servlet> <! -- The corresponding WEB-INF needs to be created under the hello-servlet.xml --> <servlet-name> hello </servlet-name> <servlet-class> org. springframework. web. servlet. dispatcherServlet </servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> <servlet-mapping> <servlet-name> hello </ servlet-name> <! -- Capture all requests, based on rest --> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file> index.html </welcome-file> <welcome-file> index.htm </welcome-file> <welcome-file> index. jsp </welcome-file> <welcome-file> default.html </welcome-file> <welcome-file> default.htm </welcome-file> <welcome-file> default. jsp </welcome-file> </welcome-file-list> </web-app> 2. hello-servlet.xml [html] <? Xml version = "1.0" encoding = "UTF-8"?> <! -- SpringMVC 2. create the corresponding servlet --> <beans xmlns = "http://www.springframework.org/schema/beans" xmlns: mvc = "http://www.springframework.org/schema/mvc" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: context = "http://www.springframework.org/schema/context" xsi: schemaLocation = "http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.sprin Gframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd "> <! -- Enable SpringMVC --> <mvc: annotation-driven/> <context: component-scan base-package = "cn.edu. zttc. controller "> </context: component-scan> <! -- Configure the prefix and suffix of the View --> <bean id = "viewResolver" class = "org. springframework. web. servlet. view. internalResourceViewResolver "> <property name =" prefix "value ="/WEB-INF/jsp/"> </property> <property name =" suffix "value = ". jsp "> </property> </bean> </beans> 3. hello. jsp [html] <% @ page language = "java" contentType = "text/html; charset = ISO-8859-1" pageEncoding = "ISO-8859-1" %> <! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">