Java代碼
//模擬HttpSession
Map《String,Object》 session=ActionContext.getContext().getSession();
//模擬Application
Map《String,Object》 application=ActionContext.getContext().getApplication();
//取得HttpServletRequest
HttpServletRequest request=ServletActionContext.getRequest();
//取得HttpServletResponse
HttpServletResponse response=ServletActionContext.getResponse();
//取得PageContext
PageContext pageContext=ServletActionContext.getPageContext();