Hi Katherine,

The pageContext can be accessed in your tag.  It is part of the
Tag interface.  All you need to do to access the pageContext is:

request = pageContext.getRequest();

Then you can set the Action.ERROR_KEY to null.

Cheers,
Ed




>From: "Luna, Katherine" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: How to remove global ActionErrors?
>Date: Fri, 31 Aug 2001 11:19:59 -0400
>
>
>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


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to