File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes How to access Errors in Action class ..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access Errors in Action class ....." Watch "How to access Errors in Action class ....." New topic

How to access Errors in Action class .....

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
I am developing My web app using Struts1.1 . Now I have A login page (embedding Login form bean) with corresponding action class( Now currently when user enters correct Username & password he is getting transferred to his account page successfully. But I want to add one more thing in above login action class:-
When user enters wrong login info , the error Object should be created into action class & it should be but into ActionErrors. & then user should get forwarded to original login page with appropriate error messages in front of Login & Passowrd textboxes on Login page.
Hope u understand my problem.
How should I do that?
Pls help me.

********Deserve Before You Desire********
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You should be able to find the answer to this question by reading the section entitled "Displaying Error Message" in this link.

This link also has some good information on using messages in Struts.

Consultant, Sima Solutions
I agree. Here's the link:
subject: How to access Errors in Action class .....
jQuery in Action, 3rd edition