Title: How to remove global ActionErrors?

Hi again,

I have a CheckLoginTag class that verifies that there is a validUser stored in the session similar to the struts-example.  I have placed <app:checkLogin /> at the top of search.jsp which contains a searchForm. 

If a user tries to access this page without being logged in, they are forwarded to the login page as I would expect.  However, since they did not complete the searchForm, validation errors are added to the global ActionError and passed along with the forward.  As a result they see the Login page complete with a warning that they need to fill in the incomplete textboxes from the searchForm!

How do I remove the errors from the pageAttribute?  I know that somehow I need to add code to remove the Action.ERROR_KEY paramater from the request if CheckLoginTag determines that there is no user in the session, but I don't know how to access the pageContext from within CheckLoginTag . 

Has anyone got a code snippet I could see or perhaps a suggestion to implement the CheckLoginTag another way so that there isn't form validation processed first?

thanks,

kat

Reply via email to