aspose file tools*
The moose likes Servlets and the fly likes Form Based Authertication problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Form Based Authertication problem" Watch "Form Based Authertication problem" New topic
Author

Form Based Authertication problem

Jack Doson
Greenhorn

Joined: Oct 02, 2008
Posts: 9
Friends ,

My Problem is , I am developing servlets which are needed to be authenticated so i used form based authentication for those servlets..!

I did it like this when ever any body requested for that servlet it will automatically display login.jsp(as usually)..! this jsp is sending username and password to some other servlet(which is does n't need any authentication)..! It will check whether username and password is correct or not..(if it is wrong it will forward request to ErrorPage.jsp)..!
if they are correct i want to forward request to actual resource(servlet) requested in the very first attempt..! Here servlet have to remember wt is the actual resource ..! I can it remember it..!

Thanks in advance...!
[ October 19, 2008: Message edited by: Bear Bibeault ]

Jack Dososn..!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
I'm not sure what the problem is. You're describing form-based authentication as it generally works, including the auto-forwarding to the originally requested resource in case of a successful login. Are you having trouble applying this?

Please change your display name or your signature so that both are in agreement. As it is, it looks as if your display name is fictitious, which is against our name policy.
[ October 19, 2008: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
Jack Doson
Greenhorn

Joined: Oct 02, 2008
Posts: 9
My problem is it how to auto forwarding to actual servlet..?
Jack Doson
Greenhorn

Joined: Oct 02, 2008
Posts: 9
yeah..! im having the same problem .. ie.. auto forwarding to originally requested resource in case of successful login..!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
But what is the problem with that? The auto-forwarding happens automatically - you don't need to do anything.

Or are you saying it doesn't happen for you? If so, which page does get displayed after a successful login?

Note that your signature still doesn't match your display name; please correct that.
[ October 19, 2008: Message edited by: Ulf Dittmer ]
venuvvp prasad
Greenhorn

Joined: Apr 04, 2008
Posts: 3
forward your jsp page using request.forward("<your servlet name>"); method it will take you to the that servlet. after that redirect to the resource ..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
forward your jsp page using request.forward("<your servlet name>"); method it will take you to the that servlet. after that redirect to the resource ..

As I pointed out above, this is not necessary for getting container-managed security to work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form Based Authertication problem
 
Similar Threads
Container based authentication
Question about Authentication
How to set a user's role
security constraint with jsp forward
Redirect to the requested page failed using form-based authentication