You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ben <ne...@gmail.com> on 2004/12/17 14:49:15 UTC

Session scope form and saveErrors

Hi

I am using Velocity 1.4 with Struts 1.2.4.

I have a session scope form and I save the error messages using
saveErrors(HttpServletRequest, ActionMessages) after I validated the
form manually. How do I display the error messages in my velocity
page?

For my other request scope forms, I use the same approach as above to
save the error messages and in my velocity page I call
$errors.get('propertyName') to display the error message. This
approach doesn't work for session scope form as $errors.exists()
returns false.

What I am doing now is save the error messages in the session and
extend StrutsUtils class to get the error messages from the session.
The original StrutsUtils class only retrieves error messages from
request. Is this the correct way to display error messages with
session scope form in Velocity?

Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org