在Servlet取得session和application
HttpSession session=request.getSession(); //获取session对象来存储用户名
ServletContext application = this.getServletContext(); // 获取application
写出优雅代码
HttpSession session=request.getSession(); //获取session对象来存储用户名
ServletContext application = this.getServletContext(); // 获取application