I found the problem (newbie issues!)

I have a global forward for login.jsp <forward name="logon"
path="/login.jsp"/>
I've changed the input attribute in the action tag to "logon" and it worked.

Thanks,

Diego.

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 5:39 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionErrors


Try using /login.jsp as your input value.

David



>From: "Diego Bursztyn" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Mailing" <[EMAIL PROTECTED]>
>Subject: ActionErrors
>Date: Wed, 12 Feb 2003 17:17:51 -0500
>
>I'm having a problem with an action error.
>I have the following config:
>
><action path="/action/logon"
>       type="com.blah.actions.LogonAction"
>       name="logonForm"
>       scope="request"
>       validate="true"
>       input="login.jsp">
>       <forward name="success" path="/main_menu.jsp"/>
>       <forward name="failure" path="/login.jsp"/>
></action>
>
>action form
>public ActionErrors validate(ActionMapping mapping, HttpServletRequest
>request)
>       {
>               ActionErrors errors = new ActionErrors();
>               if ((username == null) || (username.length() < 1))
>                       errors.add("username", new 
>ActionError("error.username.required"));
>               if ((password == null) || (password.length() < 1))
>                       errors.add("password", new 
>ActionError("error.password.required"));
>
>               return errors;
>       }
>
>if the username or the password is omitted when submitting the form,
>login.jsp should display on the browser with the error message, instead I
>get a blank browser with http://...../action/logon.do on the url.
>What am I missing?
>
>Thanks,
>
>Diego.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
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