Why not use J2EE/WEB standard container authentication? It will do what you want. In fact, it was designed to do what you want, which is called Lazy, or just in time, authentication. The user can surf your page, however, when he links to a protected item, a login page (of your choosing) will be displayed. After the user is authenticated, the proceeds to the protected resource.
-AP_ http://www.myprofiles.com/member/profile/apara_personal -----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 originally requested 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]>