springmvc_ processing queries

Demand: sending a request HTTP: // localhost: 8888 / SSM / list.do , displays in the user data to the browser

1. Create a new maven web project

2. Import jar package

3. web.xml configuration the front end of the controller class springmvc

  1. How get request parameters
  2. How to save data
  3. How jump page

 

 4. New real processing request controller class, using @Controller

 

 

 

 The write request processing in the controller method

 

 

6. Start the server deployment project, began a visit

7. Access Error

 

The reason is because springmvc DispatcherServlet in the front controller needs to read /WEB-INF/springmvc-servlet.xml startup file, but this time in the absence of the project file, so an error.

Solution:

      Mode 1: New File /WEB-INF/springmvc-servlet.xml

      Value is configured to read the directory in web.xml DispatcherServlet profile variables: manner 2

8. Configure springmvc.xml file

 

 

Guess you like

Origin www.cnblogs.com/Tunan-Ki/p/11784906.html