I'm using Tomcat 6.0. I found the solution by the way. I executed the
following steps:
1. I created a DataSource (I hope I have the language correct): In META-INF
I added a context.xml, as adding this DataSource to
%TOMCAT_HOME%/conf/server.xml is not the way to go (Changes in the code
would lead
From: AbelMacAdam [mailto:[EMAIL PROTECTED]
Subject: Re: NamingException
The context file contained the following entry:
Context path=/app15a docBase=app15a reloadable=true debug=8
More problems due to using old doc: the path and docBase attributes are
not allowed when using a META-INF
First of all if you are working with tomcat 5.5 you have to put your jdbc
library file in TOMCAT_HOME/common/lib but if you are using Tomcat 6.0 you
have to put files in TOMCAT_HOME/lib.
I think that ResourceParams is nested to Resource and you have it out of
Resource.
You must follow guidelines
ResourceParams doesn't exist in tomcat 5.5, 6.0. All those parameters
became attributes of the Resource .../ element. What version of
tomcat are you using Abel?
--David
Mariano wrote:
First of all if you are working with tomcat 5.5 you have to put your jdbc
library file in
David,
Thanks for your reply. It turns out the solution had two parts: 1) there is
a problem with the FC5 distro that requires a work-around; and 2) apparently
there is only *one* successful way to configure the JNDI resource even
after applying the work-around.
THE FC5 DISTRO PROBLEM. Credit
The attachments in my previous message got mangled. Sorry, I'm a newbie.
Here is the relevant portion of the server.xml file (the formatting in this
will probably get mangled too):
..
DefaultContext
Resource name=jdbc/WroxTC5 auth=Container type=javax.sql.DataSource/
ResourceParams
The method of defining JNDI resources in tomcat changed from 5.0 to
5.5. The book appears to be describing the method for 5.5. See
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
for details related to tomcat 5.5.
The java code used in jsps and servlets to access