在struts2中,如何将参数放到request和session里?
放到request里:
HttpServletRequest request = ServletActionContext.getRequest();
request.setAttribute("bean", swbltljl);
方到session里:
ActionContext.getContext().getSession().put("key",value);
或者是
HttpSession session = request.getSession();
放到request里:
HttpServletRequest request = ServletActionContext.getRequest();
request.setAttribute("bean", swbltljl);
方到session里:
ActionContext.getContext().getSession().put("key",value);
或者是
HttpSession session = request.getSession();