• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SqlException accured at processing Jsp

 
ramesh poorella
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai...
this is my jsp...




when i am processing above jsp i am getting exception at


then how can i solve that exception and print values



 
Smitesh Shinde
Ranch Hand
Posts: 45
Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramesh, first of all JSP isn't place to write your application logic. It is considered as bad practice.

Regarding your exception problem -

You can't be absolutely sure of which exception your JSP is throwing. You'll always get java.lang.SQLException in every case as you are explicitly throwing it from your code. Try to print the stack trace to get the exact exception.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Smitesh Shinde pointed out, the first step os to move the Java code out of the JSP and into a Java class where it can be properly tested.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic