Thank you Jeff

On Mon, 18 Oct 2004 12:35:17 -0400, Jeff Beal <[EMAIL PROTECTED]> wrote:
> When the RequestProcessor receives the request from clicking on the link
> in WelcomeBody.jsp, this is (roughly) the sequence of events that it
> follows:
> 
>  - Populate the ActionForm with request parameters (in your case, there
> are none)
>  - Validate the ActionForm (it fails; required fields are absent)
>  - When the validation fails, presents the Login.jsp page (identified
> by the input attribute) to the user, complete with error messages.
>  - If the validation had succeeded, the Action.execute method would
> have been called, and the results of that would have depended on the
> forward that was called
> 
> You need to create a second action mapping that will just present the
> user with Login.jsp:
> 
> <action path="/goToLogin"
>         forward="/Login.jsp"/>
> 
> and change the link on WelcomeBody to point to this action mapping.
> 
> -- Jeff
> 
> 
> 
> PC Leung wrote:
> > WelcomeBody.jsp calls LoginBody.jsp.
> > There is a submit button in LoginBody.jsp.
> > When LoginBody.jsp is shown, the submit button
> > seems to be pressed at the same time.
> >
> > Do I have to define global-forward "login"?
> >
> > WelcomeBody.jsp:
> > <bean:message  key="main.welcome"/>
> > <html:link action="login">
> > <bean:message  key="main.login"/>
> > </html:link>
> >
> > struts-config.xml:
> >     <action    path="/login"
> >                type="com.security.user.LoginAction"
> >                name="loginForm"
> >                  scope="request"
> >                  validate="true"
> >                input="/Login.jsp">
> >       <forward name="success" path="/SecurityMaint.jsp"/>
> >       <forward name="failure" path="/Login.jsp"/>
> >       <forward name="cancel" path="/Welcome.jsp"/>
> >     </action>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to