DWR取session,request,response

WebContext webContext = WebContextFactory.get();
HttpSession session = webContext.getSession();
HttpServletRequest request=webContext.getHttpServletRequest();
HttpServletResponse response=webContext.getHttpServletResponse();

也可以直接在dwr的java类中方法参数引入HttpSession

public String test(String name,String age,HttpSession session);

你可能感兴趣的:(java,DWR)