Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems in ActionErrors and ActionMessages in Struts 1.3

843840Apr 13 2009 — edited Apr 13 2009
Hi
I m using Struts 1.3 for creating one website. I want to perform error handling in Action.execute() method. As its a Struts 1.3 framework I have used ActionMessages class. The code I have used is as follows :
ActionMessages errors = new ActionMessages();
errors.add("symbol",new ActionMessage("errors.lookup.unknown"));

if ( !errors.isEmpty() ) 
{
         saveErrors(request, errors);
}
And Property File is
errors.lookup.unknown=<li>Unknown Symbol {0}</li>
When I run my application it is not giving me error or any exception. But I cannot see error message "Unknown Symbol" in browser.
I have also tried following code:
ActionMessages errors = new ActionMessages();
errors.add("symbol",new ActionMessage("errors.lookup.unknown"));

if ( !errors.isEmpty() ) 
{
         saveMessages(request, errors);
}
But its not working.Plz help.
Waiting 4 reply.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2009
Added on Apr 13 2009
1 comment
357 views