File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Login user automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Login user automatically" Watch "Login user automatically" New topic

Login user automatically

kumanan jk

Joined: Jul 05, 2002
Posts: 2
I am trying to programatically use j_security_check to login users to the system automatically without them having to type in anything.
Problem I'm having is that despite setting a cookie named
with the URI of the protected page I want to get to, I'm not able to get to the page. Most of the time, I'm getting a blank page with the URL ending with j_security_check.
is being generated correctly as I'm able to access the page if I type it in manually after that.
Here's some code I use in my servlet.. question I have is what am I missing?

Any kind of help or feedback is greatly appreciated.
subject: Login user automatically
It's not a secret anymore!