DataSource class

Just a question, is DataSource class used only for WAR applications? I mean will it not work unless I make my files inside WAR? I can't run my web database program using DataSources/JNDI... but I can run using DriverManager class only.... Thanks.

do you add the JDBC driver to tomcat shared library folder ? you know that a datasource and a connection pool is managed by application server and application server create and take care of them for you. so you need to add the JDBC driver to tomcat shared lib folder.

in case that this does not helps , can you past your datasource XML content (if you are using context.xml file) or tell give us more details about exception or error message that you get.

Hello Masoud Kalali, I've got naming exception error... Im using MS ACCESS as the database... Ive downloaded the driver (type 4) for it, coz I assumed this is different.(is it different from JDBC ODBC we created in Control Panel?)

Below are the xml and codes for your reference. I've been stuck w/this for a week inspite of having book references...]