parameters of three ways spring mvc passed back from the reception station

 jsp page:

The first: The method of using the controller parameter manner (common)

The second: using the model parameter passing mode ( if the parameter passed the front desk later stage very much, if it is passed using the parameter of the way, we can use very complex model parameter passing way to much.

Request parameters encapsulated entity class. )(Most used)

Third: the reference object by using HttpServletRequest

In the era of servlet, we can use the getParameter method of HttpServletRequest object acquisition parameters, after the spring mvc can also get to the HttpServletRequest object to obtain the object, you can receive parameters before the use.
HttpServletRequest object may be acquired only in the parameter may be acquired HttpServletResponse, HttpSession objects: 

 

 

Guess you like

Origin www.cnblogs.com/duguangming/p/10937203.html