Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2003, 08:29 AM
Registered User
 
Join Date: Jul 2003
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
 
Old July 11th, 2003, 08:47 AM
Authorized User
 
Join Date: Jun 2003
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.
 
Old July 11th, 2003, 09:10 AM
Registered User
 
Join Date: Jul 2003
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
 
Old July 11th, 2003, 09:43 AM
Registered User
 
Join Date: Jul 2003
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
 
Old July 14th, 2003, 01:35 AM
Authorized User
 
Join Date: Jun 2003
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).
 
Old July 24th, 2003, 02:38 AM
Registered User
 
Join Date: Jul 2003
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.






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





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