How do I retrive an ActionErrors object?
1 posts in topic
Flat View  Flat View

Posted By:   Rob_NoIdea
Posted On:   Wednesday, May 28, 2003 07:49 PM

I am creating my own tag extending TagSupport and I want to be able to retrieve the ActionErrors object? In the source code for ErrorsTag a call is made to RequestUtils.getActionErrors but I cannot find any Javadoc on this method nor does this method exist in the source code for RequestUtils . Could this be a configuration issue? Can anyone shed light on this?

Also, I would like to retrieve a session from the tag I am creating and am also unsure how to do this? Any suggestions?



Re: How do I retrive an ActionErrors object?

Posted By:   Matan_Amir  
Posted On:   Wednesday, June 4, 2003 07:51 AM

The ActionErrors object usually sits (If you saved it using the saveErrors method of the Action class) in the request under the org.apache.struts.Globals.ERROR_KEY (in version 1.1) key. In version 1.0x i think it's a static constant in the Action class. If you have access to the request object, you can get it from there.

The RequestUtils object does exist under the package org.apache.struts.utils and does have the getActionErrors method. The Javadocs are part of the Struts API documentation. This, again, is referring to the Struts 1.1rc2.

Hope that helps,
About | Sitemap | Contact