wood burning stoves 2.0*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access Errors in Action class ....." Watch "How to access Errors in Action class ....." New topic
Author

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

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
I am developing My web app using Struts1.1 . Now I have A login page (embedding Login form bean) with corresponding action class(LoginAction.java). 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.
Thanx
pras


********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.


Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: How to access Errors in Action class .....