I think you might be missing the following logic:messages tag in your jsp
file. Include the following on top of your jsp file. And set errors.header
in your application properties file.

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
 <logic:messagesPresent>
     <bean:message key="errors.header"/>
      <html:messages id="error">
        <bean:write name="error"/>
     </html:messages>
 </logic:messagesPresent>

regards
Jai

----- Original Message -----
From: "David Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 11:38 AM
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