1. 通过WebContextFactory直接获取
WebContext ctx =WebContextFactory.get();
ctx.getSession();//session对象
ctx.getHttpServletRequest();//request对象
2.通过参数的方式获取
直接在方法中添加参数HttpSession session,但在页面调用中不做任何改动
1. 通过WebContextFactory直接获取
WebContext ctx =WebContextFactory.get();
ctx.getSession();//session对象
ctx.getHttpServletRequest();//request对象
2.通过参数的方式获取
直接在方法中添加参数HttpSession session,但在页面调用中不做任何改动