This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes How to access errors from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access errors from JSP" Watch "How to access errors from JSP" New topic
Author

How to access errors from JSP

Anil Rayarapu
Greenhorn

Joined: Mar 24, 2003
Posts: 3
I have posted the errors into action errors and saved them in the request. How to retrieve them in the next form??
ActionError newError = new ActionError("order.confirm.failed");
errors.add(ActionErrors.GLOBAL_ERROR, newError);
saveErrors(request, errors);

Now when i want to put the errors on the next jsp, i just call <html:errors\>
but how can i know if there is something in this before i actually display it in the jsp? I am using a if clause.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

You don't have to worry about this test: the tag does it for you. That is, if there are no errors to display the tag will not add anything to the response.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access errors from JSP
 
Similar Threads
Using ActionErrors with Exceptions
Action Form - ERROR_KEY & saveErrors
Struts html:errors tag and JSP
Error Message Not Displaying on JSP(URGENT)
Adding an error to the ActionError in struts