| Author |
Data from database not being displayed in JSP
|
Vishal Hegde
Ranch Hand
Joined: Aug 01, 2009
Posts: 973
|
|
I showed this code to one of my collegue who is a software engineer..the database connection , the table the data in it all are correct, but he also was not able to trace the issue as of why data is not being displayed in the jsp page below is the code....
|
http://www.lifesbizzare.blogspot.com || OCJP:81%
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56215
|
|
|
If this Java code was in a class, rather than following the really bad practice of placing it in a JSP, it'd be a lot easier to debug and test. That's the first step I'd take.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Vishal Hegde
Ranch Hand
Joined: Aug 01, 2009
Posts: 973
|
|
I Debugged this in netbeans and i got this below message
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
I don't even think that should compile. Line 25, for example, isn't valid Java code.
But that's just one of the things you have to deal with when you use scriptlets. If you had put that code in a Java class, where it belongs, you would have tried to compile it and found out right away that there was bad code in it. But when you put it in a JSP, you get messages in a log file, and you might get an error page depending on whether you configured an error page into your application. Which you probably didn't.
|
 |
 |
|
|
subject: Data from database not being displayed in JSP
|
|
|