Is there a simple
WebWork pattern that helps to ensure that a user has gone thru the normal login
page?
Since browsers
allow one to save the URL to some page deep in my application, a user can try to
pop back into a page with a new browser window without having started at my
"index.jsp". Appropriate session variables aren't set, etc.
etc.
My goal would be
to NOT have some master superclass action-command that filters every action
command thru some sort of login assurance method, but if that's the pattern you
folks use, then so be it. On the other hand, I also don't want to cut and
paste that logic into every default/input/command/view scenario in my
app.
As I type this
message, I suppose this pattern could be generalized to any scenario where
someone tries to directly browse to a page without going thru the normal
application logic to get there (where various session data is stored).
It's not sufficient to say that if a session variable is null, then just make
one and put it in the session. It's most likely that the session data was
stored in another command class for the current one to use.
Thanks,
Rossi