I am using FORM authentication in my web-app, hosted in Tomcat 4.1.10 I want to vary the contents of the login screen depending on what resource was requested.
I have configured a servlet as the form-login-page so that I can forward the request to any number of appropriate login pages. But to do this I need the URL of the original request that triggered the authentication. Problem is I can't see anyway to get at this--looking through the source, the FormAuthenticator saves this info into the Session as a SavedRequest object. Problem is the SavedRequest object is part of the Catalina classloader, not available to webapps. I _think_ I can probably hack this by extracting the SavedRequest.class from catalina.jar and putting it in common/classes and then just retrieve it from the session, but man is this a hack. Is there a more civilized way to get at this information from within my login-form-page servlet? Thanks, Jeff
