Hello, all. Long time user, first time poster.

I have a few resources behind a security-constraint block in my web.xml.
I've got form-based authentication turned on. The login form is a JSP
called, oddly enough, Login.jsp. I really need to find out, from Login.jsp,
the URL of the protected resource the user tried to access. Make sense? If I
wanted to go to /FooServlet, and Tomcat sent me to Login.jsp first, I'd like
to, within Login.jsp, make a call and get a String (or a URL, or a URI, I'm
not picky) that says "/FooServlet".

I need this so I can give the user various reassuring hints and handholding,
depending on what resource they're trying to access. And since I can only
define one form-login-page, I need to do it programmatically.

Also, while we're on the subject, another question. Is there a way to
programmatically change where the j_security_check action sends you after it
authenticates? What I'd really like to do is, if the name of the protected
resource you're trying to access is empty or null (if, say, the user goes to
the login form directly, instead of trying to access a protected resource),
tell j_security_check to send you to some neutral page, instead of failing
with a "Invalid direct reference to form login page" like it does now. That
would be spiffy.

Thanks a lot,

--John Riney
Software Engineer, Arthur D. Little, Inc.

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to