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]

Reply via email to