設定属性
public class VoucherApproverListAction extends ActionSupport implements
SessionAware, ServletRequestAware, Preparable {
private HttpServletRequest servletRequest;
public HttpServletRequest getServletRequest() {
return servletRequest;
}
@Override
public void setServletRequest(HttpServletRequest servletRequest) {
this.servletRequest=servletRequest;
}
public void prepare() throws Exception {
servletRequest.setAttribute("id",tCaseVouchrDto.getId());
}
}
属性の取得
public class VoucherAction extends ActionSupport implements
SessionAware, ServletRequestAware, Preparable {
private HttpServletRequest servletRequest;
public HttpServletRequest getServletRequest() {
return servletRequest;
}
@Override
public void setServletRequest(HttpServletRequest servletRequest) {
this.servletRequest=servletRequest;
}
public void prepare() throws Exception {
String paramValue = (String)servletRequest.getAttribute("id");
logger.info("@-----Id===-----@" + paramValue);
}
}
成功後に VoucherApproverListAction アクション クラスから、VoucherAction アクション クラスにリダイレクトされるnull
paramValue で取得