I want to programmatically do the above in java, how would I do it:
I enter a webpage in my browser, lets say
http://localhost/contextRoot/secureResource AppServer sees that I'm not authenticated, so it saves off my session, and
redirects me to the login.jsp( FORM based authenication ). Then I type in
username/password and I get the original page. I understand all this, but how does it work programmatically.
This is what I have in my code thus far. I get a URL for the original page, I get the cookie( session information ). It returns back the login.jsp page.
(Stumped at this point.)
What I am trying to do at this point is create a URL
http://localhost/contextRoot/j_security_root, and setting the requestAtrribute( "cookie", "cookie from before" );
But its not returning the right page???
Some ideas or example code as to how to do it would be great.