• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adv JSP (Geary) DB examples & MySQL

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic