Mohammed Zabin wrote:
Thank you
(Please just reply to the list, not 'all')
You know what, all that advises made me somewhat confused, i have reread Tomcat Documentation, now, am not sure about the following: 1. Which is best, servlet.xml or context.xml?
You must add information to all of config files, it's not optional, I think the documentation is pretty clear on what needs to be added to each file.
(Below, < ... > is a location or name of something on your system).
2. If it is servlet.xml, which servlet.xml, is it the config file for the container, or my web application servlet.xml file.
I'm not aware of a Tomcat configuration file called "servlet.xml". Tomcat uses the following files (in addition to your web app's files): <tomcat>/conf/server.xml - main config <tomcat>/conf/context.xml - default/all contexts <tomcat>/conf/web.xml - main config You can configure the Context by placing the definition in - EITHER: <tomcat>/conf/<hostname>/<contextname>.xml OR: <webapp>/META-INF/context.xmlYou should also configure your servlet definitions and the remainder of your application as per the spec in:
<webapp>/WEB-INF/web.xml
3. Where shall i put jdbc driver class file, in my web application META-INF or in Tomcat lib folder.
Not META-INF, WEB-INF and META-INF are different locations, with different purposes. You can place the oracle jar file in -
EITHER: <tomcat>/lib OR: <webapp>/WEB-INF/lib
I susbect with jdbc driver, if you look at otn.oracle, you will find many drivers for all jdks, but there is no one for JDK 6.
It's not the driver, it's your config. Tomcat+Oracle is successfully deployed by many people all over the world.
So, in summary, as an *example* to demonstrate some possible locations for various bits of config, you might have:
Resource def in GlobalResources, 'testhost' Host def: /path/to/tomcat6/conf/server.xml ResourceLink in Context: /path/to/tomcat6/conf/testhost/ROOT.xml oracle-XXX.jar in /path/to/tomcat6/lib Resource ref, servlets in: /path/to/testhost/webapps/ROOT/WEB-INF/web.xml JSP in: /path/to/testhost/webapps/ROOT/test.jsp pp.s. Chuck, if you read this, I'm betting that you'll need to get your path attribute standard response ready.
On 5/26/07, Pid <[EMAIL PROTECTED]> wrote:Mohammed Zabin wrote: > Thank you Christ >> For instance, I usually see "oracle.jdbc.driver.OracleDriver" instead of >> what you have above. > > It's as you stated above. But with Oracle 9i and onwards, the driver > must be > oracle.jdbc.OracleDriver, anyways,> i am looking for a solution, and I am sure that i'll find one, thank youIf you've not found it yet you need to carefully re-read the advice we've offered. I think we've identified the problem and advised a solution each time, I also think you're changing more than just what we've recommended you change, and thus introducing more problems. Your last issue was that you have moved the Resource definition to GlobalResources, then failed to add the ResourceLink that makes it available to the Context. Your previous issue was that you hadn't added the driver jar to the correct place for Tomcat's classloaders to find it. The issue before that* was that your Resource config definition was incorrect, as were the previous two attempts. Before that your JSP was faulty as you hadn't imported any of the classes you needed. p * Hopefully I've got these in the right order. server.xml : GlobalResource def yourapp.xml : Context def, ResourceLink web.xml : web app deployment desc, Resource Ref your.jsp : imports, active code > On 5/25/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Mohammed, >> >> Mohammed Zabin wrote: >> > I put the jar file in my WEB-INF/lib and CATALINA_HOME/lib and >> CLASSPATH, >> > but nothing changed, I got the same error >> >> No, you are getting a different error. The first one was >> ClassNotFoundException. Now, you are getting: >> >> >>>> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create >> >>>> JDBC driver of class '' for connect URL 'null' >> >> Those are not the same. >>>> Search the archives for "Cannot create JDBC driver of class ''" and I'm>> sure you'll find this question answered hundreds of times over. >>>> It usually turns out to be an incorrect JDBC URL or an incorrect driver>> class name. Please check these over /carefully/: >> >> >>>> driverClassName="oracle.jdbc.OracleDriver" >> >>>> url="jdbc:oracle:thin:@127.0.0.1:1521:orcldb" >> >> For instance, I usually see "oracle.jdbc.driver.OracleDriver" instead of >> what you have above. >> >> - -chris >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.7 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iD8DBQFGVvxA9CaO5/Lv0PARArmAAJsEdBWX6X0TcjTLZ30hFYNjACEAZQCgr9+d >> 7ag9qjj7Q+Uxg23E0P21XyU= >> =EAkm >> -----END PGP SIGNATURE----- >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >
smime.p7s
Description: S/MIME Cryptographic Signature