Hello, 

I have been using struts 1.02 for a while now, but have only recently
got the html:errors tag working. I have come across the following
problem. 

When I perform validation in my ActionForm class, and an error is
raised, this error is correctly displayed in the jsp by using

<html:errors propert="myProperty"/>

However, when an error is raised in the perform method (im using 1.02)
in my Action class, it is created and added to the list of Action Errors
like this:

errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("my.key", "The
message"));
      
And then added as a request attribute by calling

saveErrors(request, myActionErrors);

Which I then test by printing out

System.out.println(((ActionErrors)request.getAttribute(Action.ERROR_KEY)
).size());

Which prints "1"

The browser is then correctly redirected to the error page, in which I
print out the following:

<%
  System.out.println( request.getAttribute(Action.ERROR_KEY) );
%>

Which prints "null"

What am I missing? Why arent my action class errors being displayed?

Thanks heaps for your help

toby


***************************************************************
This message is intended for the addressee named and 
may  contain confidential information. If you are not the 
intended recipient, please delete it and notify the sender. 
Views expressed in this message are those of the 
individual sender, and are not necessarily the views of 
the Department of  Lands.

This email message has been swept by MIMEsweeper 
for the presence of computer viruses.
***************************************************************


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

Reply via email to