struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ying Teng" <yt...@zenimax.com>
Subject RE: database connection
Date Wed, 02 May 2001 15:39:22 GMT
Yes, I did. I use my SQL and mine looks like this:

<data-sources>
    <data-source
       autoCommit="false"
       description="Data Source Configuration"
       driverClass="org.gjt.mm.mysql.Driver"
       maxCount="4"
       minCount="2"
       password="pass"

url="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pass
"
       user="user"
    />
  </data-sources>

What else do I need to do to add this datasource to struts? Thanks.

Ying

-----Original Message-----
From: Donnie_Hall@enron.net [mailto:Donnie_Hall@enron.net]
Sent: Wednesday, May 02, 2001 11:05 AM
To: struts-user@jakarta.apache.org
Subject: Re: database connection




Did you set up the data source configuration in your struts-config.xml file?
I'm using oracle 8.1.6, my setup looks like this.

<data-sources>
  <data-source
     autoCommit="false"
    description="Data Source Configuration"
    driverClass="oracle.jdbc.driver.OracleDriver"
       maxCount="4"
       minCount="0"
       password="password"
             url="jdbc:oracle:thin:@name.company.net:1521:sidname"
           user="username"
  />
</data-sources>

-Donnie Hall




|--------+----------------------->
|        |          yteng@zenimax|
|        |          .com         |
|        |                       |
|        |          05/02/2001   |
|        |          09:39 AM     |
|        |          Please       |
|        |          respond to   |
|        |          struts-user  |
|        |                       |
|--------+----------------------->

>---------------------------------------------------------------------------
-|
  |
|
  |       To:     struts-user@jakarta.apache.org
|
  |       cc:     (bcc: Donnie Hall/Enron Communications)
|
  |       Subject:     database connection
|

>---------------------------------------------------------------------------
-|



Hello All,

I am trying to connect to the database but when I do

DataSource dataSource =
(DataSource)servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY)
;

it gives me null as the dataSource value. Can anybody help me out here?
Thanks.

Ying








Mime
View raw message