File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Based Authertication problem

 
Jack Doson
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Jack Doson
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is it how to auto forwarding to actual servlet..?
 
Jack Doson
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah..! im having the same problem .. ie.. auto forwarding to originally requested resource in case of successful login..!
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic