Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access errors from JSP  RSS feed

 
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
Sheriff
Posts: 10948
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!