Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 11th, 2003, 08:29 AM
Registered User
 
Join Date: Jul 2003
Location: Dublin, Dublin, Ireland.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default JDBC

I cannot connect to a simpple Mysql dBase using the example in the beginning JSP book. I think it might have something to do with my jar file set up. Can someone please step through the process with me. I'm using XP and using version 5 of tomcat. I'd appreciate some urgent help as I need to finish an assignment shortly.

Thank you in advance, Darren

Darren
Reply With Quote
  #2 (permalink)  
Old July 11th, 2003, 08:47 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jwenting Send a message via MSN to jwenting
Default

The jarfile with the JDBC driver should be in the WEB-INF/lib directory of your web application.
Put it there and if your JDBC code is correct it should be picked up.
Reply With Quote
  #3 (permalink)  
Old July 11th, 2003, 09:10 AM
Registered User
 
Join Date: Jul 2003
Location: Dublin, Dublin, Ireland.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for your response I'll try it now and let you know the result.

Darren

Darren
Reply With Quote
  #4 (permalink)  
Old July 11th, 2003, 09:43 AM
Registered User
 
Join Date: Jul 2003
Location: Dublin, Dublin, Ireland.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Should the jar file be included anywhere else. DO in need to keep adding the jar file to the lib dir of each application
Sincerely

Darren
Reply With Quote
  #5 (permalink)  
Old July 14th, 2003, 01:35 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jwenting Send a message via MSN to jwenting
Default

As standard in J2EE applications each has its own classpath so would have its own libraries.

If you use JNDI and the facilities of the application server only the app server needs to have access to the actual driver (as your application will never directly access those classes, seeing only the interfaces exposed by JDBC).
Reply With Quote
  #6 (permalink)  
Old July 24th, 2003, 02:38 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have also experienced similar problem and by adding the driver in the WEB-INF\lib it does not work
could anyone tell me why.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JDBC 4.0 billfly BOOK: Professional Java, JDK 6 Edition ISBN: 978-0-471-77710-6 2 February 11th, 2007 10:53 AM
JDBC visva4u3 Java Databases 0 April 19th, 2006 06:35 AM
JDBC cooldude87801 BOOK: Beginning Java 2 2 July 30th, 2004 01:08 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis Apache Tomcat 0 January 29th, 2004 11:57 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis MySQL 0 January 29th, 2004 11:31 AM



All times are GMT -4. The time now is 08:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.