获取Servlet原生API
1、请求
<a href="param/test1">Servlet原生API</a>
2、处理方法
@RequestMapping("/param/test1") public String testParam6(HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); ServletContext servletContext = session.getServletContext(); System.out.println(request); System.out.println(response); System.out.println(session); System.out.println(servletContext); return "success"; }
相识是缘