|Using a User Library of jars on the Tomcat classpath [message #893678]
||Thu, 05 July 2012 04:49
| Adam Hardy
Registered: July 2009
I'm running Eclipse Indigo and Tomcat 6 and they are not playing nicely.|
I have a web project which needs JDBC drivers - in fact it needs 3 JDBC drivers. Since I have multiple installs of Tomcat, I figured it would be easier to put the 3 JDBC jars in a User Library and place that on the Tomcat classpath in its launch configuration, rather than adding 3 jars at a time.
Sounds like a minor issue - guess it is, but I'm documenting the process for our team and it would nice to have.
This is how I do it:
- Create a user library
- Add the 3 JDBC driver jar to it
- Open up a server config window via double click in Servers view
- change to Classpath tab
- Select 'User Entries'
- Click on Advanced button
- Choose Add Library
- Choose User Library
- Select the JDBC library
but Eclipse doesn't add the jars. The app fails when it tries to connect to the DB and secondly when I add the server as a run-time target to the project, then in the project view I figured I should see the jars as well.
Am I doing something wrong or does Eclipse WTP not work like that? If it is just functionality that never existed, why not? Surely I'm not the first to want to do this? To tell the truth, googling the problem didn't find any sign of other people having the issue, so maybe I am.