For some reasons, this <html:errors> is no longer
working for me :( can some one help me out?

In the web.xml, I  added this

    <!--the application resources -->
    <init-param>
       <param-name>application</param-name>
       <param-value>ApplicationResources</param-value>
    </init-param>


In the struts-config.xml, I  added this:

<action-mappings>
    <!-- Retailer-Main -->
    <action path="/forgetpassword"
           
type="com.fnet.struts.login.ForgetPasswordAction"
            name="forgetPasswordForm" 
            input="/login.jsp"
            scope="request"
            validate="true">
        
    </action>
    
  </action-mappings>   

in the ACtionForm bean my validate method work fine:

 public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
   {
     
FNPrinter.toScreen("<ForgetPasswordForm>-validate():
validating User-info ...");
      ActionErrors errors = new ActionErrors();
      
      
      if ((userId == null) || (userId.length() < 1))
      {
        
FNPrinter.toScreen("<ForgetPasswordForm>-invalid
UserId: " + userId);
         errors.add("errInvalidUserId", new
ActionError("error.login.forgetpw.userid.invalid"));
      }

      if ((userEmail == null) || (userEmail.length() <
1))
      {
        
FNPrinter.toScreen("<ForgetPasswordForm>-invalid
UserEmail: " + userEmail);
         errors.add("errInvalidUserEmail", new
ActionError("error.login.forgetpw.useremail.invalid"));
      }
      
      FNPrinter.toScreen("Error-Log: " +
errors.size());
      
      return errors;
   }


and the jsp page , I tried to display the error like
this:
<tr>
    <td colspan="1">&nbsp;</td>
    <td align="left">User_Name:&nbsp;&nbsp;</td>
    <td align="left" colspan="1">
        <html:text property="userId" size="20" />
        &nbsp;&nbsp;
        <html:errors property="errInvalidUserId" />
    </td>
</tr>


my Application resources also has the property for
this key...

it still does not work for me, 

CAn someone help me on this.
thanks

Binh


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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

Reply via email to