2012年6月11日月曜日

struts2 actionの中、パラメター設定


  1.   
  2. /**   
  3.     * File Name:BaseAction.java * Version: * Date:2010-1-27 * Copyright Belongs To Musoon  Corporation 2010    
  4. */  
  5.        
  6. package com.action;   
  7.   
  8. import java.util.Map;   
  9.   
  10. import javax.servlet.http.HttpServletRequest;   
  11. import javax.servlet.http.HttpServletResponse;   
  12.   
  13. import org.apache.struts2.ServletActionContext;   
  14.   
  15. import com.opensymphony.xwork2.ActionContext;   
  16. import com.opensymphony.xwork2.ActionSupport;   
  17.   
  18. /**  
  19.  * Project Name:ZhiMing   ** Class Name:BaseAction   
  20.  * Author:Musoon        ** Created Time:2010-1-27 下午06:45:35   
  21.  * Changed By:Musoon   ** Changed Time:2010-1-27 下午06:45:35   
  22.  * Changed Memo:   
  23.  * @version   
  24.  * Class Description:   
  25.  */  
  26.   
  27. public class BaseAction extends ActionSupport {   
  28.   
  29.     private static final long serialVersionUID = 7620009925942346125L;   
  30.        
  31.     ActionContext context = ActionContext.getContext();   
  32.     HttpServletRequest request = (HttpServletRequest) context.get(ServletActionContext.HTTP_REQUEST);   
  33.     HttpServletResponse response = (HttpServletResponse) context.get(ServletActionContext.HTTP_RESPONSE);   
  34.     Map session = context.getSession();   
  35.     //SessionMap session = (SessionMap) context.get(ActionContext.SESSION);   
  36.        
  37. }  

0 件のコメント:

コメントを投稿