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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to