Re[2]: related to: Re: #2 - Use DispatchAction to organize related operations

2002-06-03 Thread Chuck Cavaness

The processPreprocess() method has the request and response as arguments, 
so you should be able to get everything you need. Remember, the method 
returns a boolean that tells the RequestProcessor whether it should 
continue to process the request or not. If you find that the user is not 
logged in, you'll need to return false, but also redirect the user 
manually. You can still get access to the GlobalForwards and such; it's 
just that you'll need to take care of the redirecting part. You can call 
the processActionForward() method and pass it the ActionForward for the 
login page, for example.

Chuck

At 11:04 PM 6/3/2002 -0400, you wrote:
>On Monday, June 3, 2002, 10:58:07 PM, Chuck Cavaness wrote:
>
>CC> What I suggest is to look at the processPreprocess() method in the
>CC> RequestProcessor and possibly override this to do your checks. It's 
>called
>CC> for every request and long before ActionForm's are populated and Action's
>CC> are invoked. The default value is to return true, which allows request
>CC> processing to continue. What I've done in the past is to override this,
>CC> check the login, and possibly redirect the user to the login page. If the
>CC> user's logged in, just return true to continue processing the request.
>
> Excellent idea. Thanks. You are right I wouldn't even want form
> validation to take place if they weren't logged in ( which would
> be allowed to happen if I only checked in the action ). I take it
> I'll have access to the session as well inside of
> RequestProcessor, because if I go this route I will also need to
> check for particular roles that will be stored in a UserBean put
> in the Session and possibly deny or grant access based on these
> roles.
>
>--
>
>Rick
>
>mailto:[EMAIL PROTECTED]
>
>"I wish I had a dollar for every time I spent a dollar, because then,
>Yahoo!, I'd have all my money back."
>   -Jack Handey
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[2]: related to: Re: #2 - Use DispatchAction to organize related operations

2002-06-03 Thread Rick Reumann

On Monday, June 3, 2002, 10:58:07 PM, Chuck Cavaness wrote:

CC> What I suggest is to look at the processPreprocess() method in the 
CC> RequestProcessor and possibly override this to do your checks. It's called 
CC> for every request and long before ActionForm's are populated and Action's 
CC> are invoked. The default value is to return true, which allows request 
CC> processing to continue. What I've done in the past is to override this, 
CC> check the login, and possibly redirect the user to the login page. If the 
CC> user's logged in, just return true to continue processing the request.

Excellent idea. Thanks. You are right I wouldn't even want form
validation to take place if they weren't logged in ( which would
be allowed to happen if I only checked in the action ). I take it
I'll have access to the session as well inside of
RequestProcessor, because if I go this route I will also need to
check for particular roles that will be stored in a UserBean put
in the Session and possibly deny or grant access based on these
roles.

--

Rick

mailto:[EMAIL PROTECTED]

"I wish I had a dollar for every time I spent a dollar, because then,
Yahoo!, I'd have all my money back."
  -Jack Handey


--
To unsubscribe, e-mail:   
For additional commands, e-mail: