session可以通过request.getSession();来获取
application可以通过this.getServletContext() 或 request.getSession.getServletContext()来获取
1 public class ServletTest extends HttpServlet {2 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {3 HttpSession session = request.getSession();4 ServletContext application = this.getServletContext();5 }6 }