Hello,

I'm trying to get working <html:errors/> tag but I fail in this task...
The webapp has the following files:
- LoginAction.java (extend Action)
- LoginForm.java (extend ActionForm)
- Login.jsp

Here an extract of the struts-config.xml:
----------------
<form-beans>
  <form-bean name="loginForm" type="app.LoginForm" />
</form-beans>
<action-mappings>
  <action path="/login" type="app.LoginAction"
    name="loginForm" scope="session" validate="false">
    <forward name="Success" path="/jsp/Main.jsp" /> 
    <forward name="Failure" path="/jsp/Login.jsp" /> 
  </action>
</action-mappings>
----------------

First the flow branches on the login.do action, which forward to Login.jsp
(through 'Failure' forward). The form appears. After validation we fall in
LoginAction.execute(), this method does a validate() on the form transmitted (a
LoginForm).
If validate() returns a not empty list of ActionError encapsulated in an
ActionMessages, we save these errors with this.saveErrors(request, errors)
(errors is the return of validate()), and we forward to Login.jsp, through
'Failure' forward.
In Login.jsp, there's a <html:errors/> tag, but even if 'errors' is not empty,
this tag does nothing, however errors is really not empty because I can get its
content with little java code in the JSP.

I don't understand what is wrong. It's like <html:errors/> was ignored.
Container is Tomcat 5.5.9, struts is 1.2.7.

Thanks in advance for help.

Vincent



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

Reply via email to