Dear Jim,
Thank you for your rapid response. Here is the specific information:
Web server: tomcat321
database: ACCESS
OS: Window 2000
JDK: JDK1.3
----------------------------------------------
1. For testing purpose, I put database under my application root directory
and setup DSN in ODBC.
2. I initiate the database config in the struts-config.xml:
<data-sources>
<data-source
autoCommit="false"
description="Example Data Source Configuration"
driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
maxCount="4"
minCount="2"
key="abc"
password=""
url="jdbc:odbc:test"
user="" />
</data-sources>
3. The codes in the Action class for connecting the database is:
try {
....
DataSource ds = servlet.findDataSource("abc");
.....
The problem is: can NOT find the data source. Is there any more thing to
do for connecting the database?
Thanks a lots!!
-----Original Message-----
From: Jim Richards [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 06, 2001 6:41 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem for connecting DB
Can you be more specific? What web server, what database,
what's your environment? What JDK are you running? What
problems did you get?
"Wang, Meng" wrote:
>
> Hi, I tried to use struts to connect the relational database and
experoenced
> some difficulties. Is there some example to show that? Thanks