This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes  SqlException accured at processing Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark " SqlException accured at processing Jsp" Watch " SqlException accured at processing Jsp" New topic
Author

SqlException accured at processing Jsp

ramesh poorella
Ranch Hand

Joined: Jul 19, 2011
Posts: 42
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

Joined: Feb 16, 2008
Posts: 44

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

Joined: Jan 10, 2002
Posts: 56201
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: SqlException accured at processing Jsp
 
Similar Threads
exception while running code
page gets hang on runtime
Unable to find specific product
jsp to pdf
Number Format Exception