Hi Kim & Andre

Yes, the errors (in my case just one error) are defined in the 
ApplicationResources.properties. But what do you mean Andre, with "redirection"? I 
think that after the command "return (new ActionForward(mapping.getInput()));", I 
return control to the struts "ActionServlet", and so, don't have any control on what 
happens next? Am I wrong?

Marcel

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 5:47 PM
To: [EMAIL PROTECTED]
Subject: RE: Does <html:errors> not work proper?


One possibility is that there's a redirection occuring somewhere.
Since error bean is stored in request scope, it would be lost after a
redirection
(a new request).

Andre Paradis

-----Original Message-----
From: MacKellar, Kimberly [mailto:[EMAIL PROTECTED]]
Sent: September 10, 2001 11:33 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Does <html:errors> not work proper?


Are all of your errors defined in the ApplicationResources.properties?

Kim MacKellar

-----Original Message-----
From: Marcel Andres [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 10:06 AM
To: struts-user
Subject: Does <html:errors> not work proper?


Hi there

Like most of you, I am using the <html:errors>-tag to show errors on the
JSP
page. My problem is, that I don't get any message on the JSP page. I do
the
following check before I return to the form:

if (!errors.empty()) {
        saveErrors(request, errors);
        return (new ActionForward(mapping.getInput()));
}

When I check the values, "errors.empty()" it is set to false, and the
value
for "errors.size()" is 1.

On the JSP, I am using a template with header, main, and footer. In the
header I declared this:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

....

<!----- Handling the Errors ----->
<table border="0" cellspacing="0" cellpadding="0" width="100%"
height="18">
 <tr>
  <font class="error">
   <html:errors/>
  </font>
 </tr>
</table>


Any comments would be appreciated.

Marcel

Reply via email to