I apologize in advance if I did not post this in the correct forum. I'm having trouble getting my prepared statement to execute properly. I have tried creating the SELECT query many different ways this is just one of them. When this method is called it prints out string from System.out.println("BEfore DB call. " + pg + " " + perPg); in my console then drops out with no data returned. In fact it appears my code cannot reach System.out.println("After DB call. "); output. I cannot get the query to execute properly.
Any help would be greatly appreciated.
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
posted
0
Your code is throwing a SQLException. What is it.?
Tom Shypulski
Greenhorn
Joined: Jan 02, 2009
Posts: 8
posted
0
Hmm. I see no SQLException in my eclispe console it only returns test data System.out.. . The method call returns to a servlet. When I test in my browser it drops back to servlet (http://localhost/servlet/coreservlets.WebAppsServlet?pages=1&linksPerPage=5) and displays blank screen. It should return the data to servlet and depening on what it contains redirect to one of two JSP pages.
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
posted
0
Your method throws SQLException so somewhere in your stack, it's eating it. I suggest you catch SQLException and log the error. Or you can check your log files.