struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <>
Subject RE: Forward after <check-login>
Date Tue, 23 Apr 2002 23:07:54 GMT
I actually extended ActionServlet and intercept each request. From there, I
can check whether we are restricting certain paths, then check the login
cookie for the necessary permissions. If they haven't logged in, I forward
to the login page with the requested URL in an attribute.

This might not be the best approach. Can anyone suggest a better way while
still having it in the controller? Extending ActionServlet poses problems
for later if we start using Tiles with definitions when struts 1.1 is
released. Is there a way to plugin to the action servlet at the doPost/doGet
level as I currently do without extending it?

Whatever the case, this code should certainly reside in the controller, not
in a tag which is processed in the view because whatever the action is
doing, it has already processed it before checking auth.

- Brett

-----Original Message-----
From: Andy Timm []
Sent: Wednesday, 24 April 2002 2:13 AM
Subject: Forward after <check-login>

I have some pages which require a user to be logged in
and some which do not.  If the <check-login> tag
determines that there is no user logged in, the user
is forwarded to the login page.  I'd like to remember
where the user came from and forward them there after
a successful authentication.  I'm sure there are
multiple ways of doing this and I would like some
advice.  Thanks, Andrew Timm

Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message