import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import com.fujitsu.uji.http.HttpBeanUpdater;
...
public class MyAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
ServletContext context = request.getSession().getServletContext();
ClassLoader loader = this.getClass().getClassLoader();
HttpBeanUpdater beanUpdater = new HttpBeanUpdater(context, request, loader);
MyDataBean dataBean = (MyDataBean)beanUpdater.getRequestBean();
...
}
}
|