You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joseph Yang <ya...@rewardstream.com> on 2003/05/16 00:05:58 UTC

How to call an action without actionForm definition?

Hi All,

I have two pages, let's call them page1.jsp(some text boxes and a submit
button) and page2.jsp in struts-config.xml, I put:
...

  <action-mappings>
    <action name="welcomeForm" type="com.xxx" validate="true"
input="/page1.jsp" scope="request" path="/registrationAction">
      <forward name="success" path="/page2.jsp" />
      <forward name="failure" path="/page1.jsp" />
    </action>
  </action-mappings>
.....

Now I click submit button on page1.jsp, everything is fine, page2.jsp shows
up, there is only one button labeled "go back to page1.jsp" on the page,
question:

When I click this button, what should I do so I can call registrationAction?


Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: How to call an action without actionForm definition?

Posted by Joseph Yang <ya...@rewardstream.com>.
That's OK only if I turn off the validate flag, otherwise before I get into
the action class, the validation will come into the picture, obviously it
will fail because the actionForm will be null...

Any other comments?

Thanks

-----Original Message-----
From: Neil Erdwien [mailto:neil@k-state.edu]
Sent: Thursday, May 15, 2003 3:32 PM
To: Struts Users Mailing List
Subject: Re: How to call an action without actionForm definition?


I think you are looking for:

<html:link page="/registrationAction.do">go back to page1.jsp</html:link>


Joseph Yang wrote:
> Hi All,
>
> I have two pages, let's call them page1.jsp(some text boxes and a submit
> button) and page2.jsp in struts-config.xml, I put:
> ...
>
>   <action-mappings>
>     <action name="welcomeForm" type="com.xxx" validate="true"
> input="/page1.jsp" scope="request" path="/registrationAction">
>       <forward name="success" path="/page2.jsp" />
>       <forward name="failure" path="/page1.jsp" />
>     </action>
>   </action-mappings>
> .....
>
> Now I click submit button on page1.jsp, everything is fine, page2.jsp
shows
> up, there is only one button labeled "go back to page1.jsp" on the page,
> question:
>
> When I click this button, what should I do so I can call
registrationAction?
>
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

--
Neil Erdwien, neil@k-state.edu, Web Technologies Manager
Computing and Network Services, Kansas State University


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: How to call an action without actionForm definition?

Posted by Neil Erdwien <ne...@k-state.edu>.
I think you are looking for:

<html:link page="/registrationAction.do">go back to page1.jsp</html:link>


Joseph Yang wrote:
> Hi All,
> 
> I have two pages, let's call them page1.jsp(some text boxes and a submit
> button) and page2.jsp in struts-config.xml, I put:
> ...
> 
>   <action-mappings>
>     <action name="welcomeForm" type="com.xxx" validate="true"
> input="/page1.jsp" scope="request" path="/registrationAction">
>       <forward name="success" path="/page2.jsp" />
>       <forward name="failure" path="/page1.jsp" />
>     </action>
>   </action-mappings>
> .....
> 
> Now I click submit button on page1.jsp, everything is fine, page2.jsp shows
> up, there is only one button labeled "go back to page1.jsp" on the page,
> question:
> 
> When I click this button, what should I do so I can call registrationAction?
> 
> 
> Thanks!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
Neil Erdwien, neil@k-state.edu, Web Technologies Manager
Computing and Network Services, Kansas State University


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org