I set up the test app and the database as per the instructions provided on
that link you gave me which
I will reproduce here :

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

I put everything within the <Context ... element (under heading 2.Context
Configuration) into 
a separate <Context element in conf/context.xml.  (Underneath the first one)

Inside webapps I created a directory called DBTest for the webapp. Inside
that I created a WEB-INF
subdirectory, and put a web.xml with the contents of everything under 
heading 3. web.xml configuration.  I added a subdirectory /lib to WEB-INF
into which I copied
both jstl.jar and standard.jar. (As per the directions under heading 4. Test
Code) 
I copied test.jsp to the DBTest directory and when I tried to 
access the url ttp:localhost:8080/DBTest/test.jsp,  I got the all too
familiar '404, Resource not found' error.

I can't of anything I did wrong, at least as far as the directions on that
site go.
Is there any thing additional that needs to go into web.xml that I am
leaving out ?

A quick peek at catalina.out showed this :

  [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -n 100
catalina.out
Jan 14, 2008 5:26:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jan 14, 2008 5:26:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/docs] startup failed due to previous errors
Jan 14, 2008 5:26:24 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 20 column 2: The markup in the document
following the root element must be well-formed.

So it seems to be complaining about my context.xml. The offending line looks
to be :

 <Context path="/DBTest" docBase="DBTest"
        debug="5" reloadable="true" crossContext="true">

Could the path attribute be incorrect ? I followed the directions exactly. 


David Smith-2 wrote:
> 
> Find the mysql-connector-java-5.0.8.jar file in the download you 
> received from mysql.com.  Put only that file in tomcat's lib directory.  
> Remove the rest from tomcat's lib directory and things should be good to 
> go.  If the mysql .jar file is located anywhere else in your tomcat 
> installation including any of your webapps, please remove it from all 
> those other places.  It can be either in tomcat's lib directory OR your 
> webapp's WEB-INF/lib directory -- never both.
> 
> --David
> 
> cuco2772 wrote:
>> Where is the jdbc driver normally located ? I did a 'locate jdbc' and
>> found
>> it in a bunch of places, ie, 
>> /usr/lib/jvm/java-6-sun-1.6.0.00/imq/demo/jdbc/config.properties.mysql
>>
>> Would it be in this directory in tomcat ?:
>>
>> [EMAIL 
>> PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/lib/mysql-connector-java-5.0.8
>>  
>>
>> (I also have the mysql-connector-java-5.0.8-bin.jar file copied to /lib,
>> but
>> not in
>> mysql-connector-java-5.0.8.
>>
>>
>> Caldarale, Charles R wrote:
>>   
>>>> From: cuco2772 [mailto:[EMAIL PROTECTED] 
>>>> Subject: Re: how to configure (server.xml) for mysql dev with 
>>>> tomcat/JDBC
>>>>
>>>> I gathered from that doc that you would put a <Context> 
>>>> element directly in conf/context.xml, and not in
>>>> server.xml, as previously. 
>>>>       
>>> No.  The <Context> element in conf/context.xml is for attributes that
>>> are common to all webapps deployed in Tomcat.  An individual webapp's
>>> <Context> element should be in the webapp's META-INF/context.xml file.
>>>
>>>  - Chuck
>>>
>>>
>>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>>> MATERIAL and is thus for use only by the intended recipient. If you
>>> received this in error, please contact the sender and delete the e-mail
>>> and its attachments from all computers.
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-configure-%28server.xml%29-for-mysql-dev-with-tomcat-JDBC-tp14793219p14822673.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to