http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
i cut and paste the source codes for MYSQL Example...
u r right... first error was javax.sql.* missing... but i included all the
directories in classpath that error cleared..
this is the jsp file... DBTest is the class file.. (that i compiled inside
my oracle directory and moved to Tomcat and tried placing everywhere....)
--------------------------------------
<html>
<head>
<title>DB Test</title>
</head>
<body>
<%
foo.DBTest tst = new foo.DBTest();
tst.init();
%>
<h2>Results</h2>
Foo <%= tst.getFoo() %><br/>
Bar <%= tst.getBar() %>
</body>
</html>
----------------------
Peng Tuck Kwok
<pengtuck@makm To: Tomcat Users List
<[EMAIL PROTECTED]>
al.net> cc:
Subject: Re: DataSource error (DBCP)
12/23/2002
08:23 AM
Please respond
to "Tomcat
Users List"
Could you post your source code for the java code? Sounds like you are
missing javax.sql.* , but can't be sure until someone has a look at it.
[EMAIL PROTECTED] wrote:
> i've already done that....
> somehow i compiled :) DBTest.java and where should i place the
DBTest.class
> file. EVERYWHERE I TRIED :(......... anyone can answer ?
>
> regards and thanks
> sunil
>
>
>
>
> "Galbayar
> Dorjgotov" To: "Tomcat Users List"
<[EMAIL PROTECTED]>
> <galbayar@mobi cc:
> net.mn> Subject: RE: DataSource
error (DBCP)
>
> 12/23/2002
> 01:49 AM
> Please respond
> to "Tomcat
> Users List"
>
>
>
>
>
>
> copy mysql jdbc driver to tomcat/common/lib directory
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 3:09 AM
> To: [EMAIL PROTECTED]
> Subject: DataSource error (DBCP)
>
>
> hi all,
>
> i'm new to tomcat... if my queries are foolish...pl forgive. :)
>
> my configuration is RH Linux 8/MYSQL 3.../TOMCAT 4.1.8
>
> all the examples provided are working correctly...
>
> i tried JNDI Datasource HOW-TO (more details in the URL)
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
>
> to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
> 4
> i tried with MYSQL DBCP Example
>
> 1. i've created mysql username,password,database,tables,records
> 2. i've changed the server.xml configuration by inserting the codes
given
> under no.2
> 3. i've created a web.xml as in no.3
> 4. i've written the same test.jsp and DBTest.java
>
> and i created a directory DBTest and placed test.jsp and DBTest.java
> there and another subdirectory called WEB-INF and placed the web.xml
there.
> I tried to compile DBTest.java and ended up an error
> --------
> Type 'Datasource' not found in the declaration of table 'ds'
>
> "DataSource ds= ...."
> ^
> 1 error
> ---------
>
> please help!!!!!
>
> THANKS IN ADVANCE
>
> best regards
> sunil
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail: <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail: <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>