[mw_shl_code=java,true] public String fun1() { ActionContext actionContext = ActionContext.getContext(); actionContext.getApplication().put("app", "app scope"); actionContext.getSession().put("sec", "Secssion Scope"); actionContext.put("req", "request scope"); actionContext.put("names"、Arrays.asList("Zhang San"""李思"""Wang Wu")); 「メッセージ」を返す;
}
public String getServlet() { HttpServletRequest request = ServletActionContext.getRequest(); request.setAttribute("req", "request scope"); request.getSession().setAttribute("sec", "Secssion Scope"); ServletContext servletContext = ServletActionContext.getServletContext(); servletContext.setAttribute("app", "app scope"); 「メッセージ」を返す; [/mw_shl_code] |