Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adv JSP (Geary) DB examples & MySQL  RSS feed

 
Stephen Pride
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I purchased "Advanced JavaServer Pages" by David Geary, and am having a fit trying to get any of the database examples to work. I converted all the code to fit MySQL, and got the queries, etc., to actually work without throwing an exception, however, I am getting no data returned. I debugged it to the point where I see the ResultSet getting populated with data, and the resultant page shows the correct (table) column headings, but no data is shown (and no errors are displayed). I am running MySQL v3.23.47 , Tomcat 4.0.1 as a stand-alone server, Java 1.3.0 as the JVM, and RedHat Linux v7.2.
Any help would be appreciated. Thanks!
 
Biju Nair
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are not closing the statement or connection objects before you traverse through your resultset. If you put in some of your your code, we could get a better picture.

------------------
--:Biju:--
Transversal e Networks
Technopark, Kerala, India
 
Stephen Pride
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only code I modified was changing the DB keywords in the web.xml file (i.e., driver name, user/password, etc.).
You can get the code here ...
http://www.phptr.com/advjsp
When you unJAR the file, the example in question is at: booksource/10
I was able to successfully get the case study working, which also contains the database section. The case study example is immensely huge, but it (roughly) contains the same DB code as in the booksource/10 example. Since I got the case study code working, I'll just examine that example instead.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!