I'm looking at the same problem now as well.  I'm looking into the possibility
of using a Servlet Filter.  So every request JSPs, Actions, and even images will
be checked for auth.  Basically see if a session is there and valid otherwise
forward to a login page.

Has anybody else tried this?

-kevin

> -----Original Message-----
> From: Rick Mann [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 28, 2002 3:53 PM
> To: Struts Users Mailing List
> Subject: Best way to forward to login, then re-forward to
> originallyrequested resource?
>
>
> I've got a typical struts application up and running. Certain actions check
> to see if the user is logged in, and if not, forward to a login JSP. That
> JSP then posts to a LoginAction. The LoginAction then forwards back to the
> originally requested action.
>
> The problem I have is that currently, this stuff is really hacked up. The
> login JSP has a hidden field indicating the desired action, and the action
> has to append a ".do" to that value, etc. The original action puts a request
> attribute in (the result of it calling mapping.getPath()).
>
> Surely, there is a much cleaner way to do this, one that works for both
> Actions and JSPs, and that works without special code to handle the URL
> mapping for actions.
>
> TIA,
>
> --
> Rick
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to