• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access errors from JSP

 
Anil Rayarapu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7602
54
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic