File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to display  Error Messages in Action class  to the User Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to display  Error Messages in Action class  to the User" Watch "How to display  Error Messages in Action class  to the User" New topic
Author

How to display Error Messages in Action class to the User

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I am using Struts Framework 1.1 , On to the Action class execute Method , under the catch block , if any error occurs , i am setting the data inside the ActionErrors Object as shown



This ErrorPage points to ErrorPage.jsp


Please tell me under the ErrorPage.jsp how can i display them to the USer ??

Thanks in advance .


Save India From Corruption - Anna Hazare.
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

Using a <html:error /> tag where you would like to display the errors should help you out.

Cheers,
Raj.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display Error Messages in Action class to the User