• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in my login page  RSS feed

 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have created a authentication servlet as follows :

when, i use it, an exception appears in my console as follows :

I just want to know how can i move to another jsp page from my servlet.
Could you please tell me what's wrong in my code? and why i can't go to another page?
thank you in advance
 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If my query return not only one line but also many line.
How can i retrive it in my servlet ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should exit the loop (or put a return statements) after issuing a sendRedirect call.

If my query return not only one line but also many line. How can i retrive it in my servlet ?

That's what the while loop would do, if not every single path through it contained a sendRedirect call.

I think I told you this before, but empty catch blocks are bad - REALLY bad for I/O like DB accesses.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!