File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Action errors and a message
Joined: Jan 07, 2007
Feb 08, 2009 16:47:07
Let's say I have an action which can generate some action errors, and I want to print these errors in the view.
I could use the actionError tag to do this, but, is there a parameter or something to be able to add a message like "These errors occurred" only when you have errors?
Or should I use hasActionErrors() and s:iterator to print the action errors by myself?
Joined: Sep 29, 2008
Feb 09, 2009 04:12:27
Use an "if" to see if there are errors and display an error message if there are.
It is sorta covered in the
JavaRanch Style Guide
subject: Action errors and a message
Unable to generate error from Action class !
Action Forms Vs html pages
how to access actionErrors in Struts2?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013