  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | -none- | -none- 2007-09-05 - By Al Sutton
Back Using the default interceptor stack as the base I have the following action defined;
<action name="ProcessStepAdd" class="com.alsutton.hrtool.actions.restricted.ProcessStepAction"> <interceptor-ref name="store"> <param name="operationMode">STORE</param> </interceptor-ref> <result type="redirect-action"> <param name="actionName">EditProcess</param> <param name="processId">${processId}</param> <param name="parse">true</param> <param name="encode">true</param> </result> </action>
I have the following code as the action;
public class ProcessStepAction extends ActionSupport {
/** * Serial ID. */ private static final long serialVersionUID = -562645196977332471L;
private Long processId; private Long stepId; public String execute() { System.out.println("Running for "+processId+","+stepId); return SUCCESS; }
public Long getProcessId() { System.out.println("**** Req ProceId"+processId); return processId; }
public void setProcessId(Long processId) { this.processId = processId; System.out.println("**** Set ProceId"+processId); }
public Long getStepId() { return stepId; }
public void setStepId(Long stepId) { this.stepId = stepId; System.out.println("**** Set StepId"+stepId); } }
And when I enter the URL;
http://.../ProcessStepAdd?processId=1&stepId=2
I get the following output;
Running for null,null
And the redirect has an empty string for the processId.
Does this mean an action can't take parameters from an HTTP GET?
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |