On Fri, 22 Jun 2001, Lou Farho wrote:

> I noticed that when I bookmark a link with *.do, the form is loaded
> and validated before I check for a valid logon/session.
> 
> Am I suppose to put code into my forms to check for a logon/session?
> 
> Shouldn't there be way to tell the Controller ( ActionServlet) to
> perform some sort of logon/session validation a priori?  I wouldn't
> want a bunch of overhead to be performed then go to the Action Form to
> find out that the logon/session is invalid.  I checked the struts
> example and noticed I am suppose to check for nulls and if null then
> add new ActionError for each field in the request that is missing!  
> This can really add up on top of creating the form to begin with.
> 
> Thanks for listening!
> 

Interestingly (well, at least to me :-), the predecessor framework I wrote
that was the basis for lots of the ideas in Struts had this exact
concept.  On every call through the controller servlet, it would check for
the existence of a particular session attribute, and redirect the user to
a logon page if it was missing (i.e. because this was a new session, or
because the previous session timed out).

Alas, this feature didn't get added to the Struts version of the
controller servlet, although it would be pretty easy to do.  Do people
think this would be useful?

> 
> Lou Farho

Craig

Reply via email to