struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Dahlin" <sdah...@cableone.net>
Subject datasource problem
Date Wed, 01 Jan 2003 20:42:45 GMT
When I try to get a datasource which has been defined in the struts-config.xml no matter what
I do the datasource returns back null.  My struts-config.xml for data-sources is:

    <data-sources>

        <data-source key    = "conPool">

            <set-property  property  = "autoCommit"
                           value     = "false"/>
            <set-property  property  = "description"
                           value     = "database source"/>
            <set-property  property  = "driverClass"
                           value     = "oracle.jdbc.driver.OracleDriver"/>
            <set-property  property  = "user"
                           value     = "theuser"/>
            <set-property  property  = "password"
                           value     = "thepassword"/>
            <set-property  property  = "url"
                           value     = "jdbc:oracle:thin:@192.192.192.192:1675:inst"/>
         </data-source>

      </data-sources>    

In the section of code used for initialization of the datasource there is the following:

            ServletContext context = actSrv.getServletContext();
            dsSrc    = ( DataSource ) context.getAttribute( "ConPool" );

The context is captured but the datasource remains null.

Any suggestions?

Thanks,
Steve



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message