6、SpringMVC之使用原生API
/**
* 获取原生API HttpServletRequest,HttpServletResponse HttpSession等
*
*/
@RequestMapping("/selectUser")
public String selectUser3(HttpServletRequest request, HttpServletResponse response){
String name = request.getParameter("name");
HttpSession session = request.getSession();
session.setAttribute("Account", new Account());
System.out.println(session);
ServletContext servletContext = session.getServletContext();
System.out.println(servletContext);
return "success";
}