Re: Interceptor best practices ...

2008-01-04 Thread Dave Newton
--- Mufaddal Khumri <[EMAIL PROTECTED]> wrote: > In Struts1 I did have a Base Action that I extended from along with a > session scoped variable that kept track of whether the user is logged > in or not. This functionality is needed by multiple actions who ended > up extending the base class.

Re: Interceptor best practices ...

2008-01-04 Thread Mufaddal Khumri
In Struts1 I did have a Base Action that I extended from along with a session scoped variable that kept track of whether the user is logged in or not. This functionality is needed by multiple actions who ended up extending the base class. Since Struts 2 has interceptors, I felt that it woul

Re: Interceptor best practices ...

2008-01-04 Thread Ted Husted
The best use of interceptors is for behavior that will be shared by several Actions. If there are several different places where a client might be authenticated, then, in that case, a login interceptor (and a custom interceptor stack) can be a good idea. When coding an Interceptor, you can just re

RE: Interceptor best practices ...

2008-01-04 Thread Al Sutton
imho, you shouldn't be validating the users username and password in an interceptor. You should validate them in an action, then set a token in the session indicating the user had been validated, then check for your chosen token in the interceptor. That way you don't need to keep hitting your user