You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Liu Jian <jl...@stny.rr.com> on 2003/01/01 22:25:57 UTC
"conPool" --> "ConPool" / Re: datasource problem
Will the data-source key case-sensitive? "conPool" --> "ConPool"
Try
dsSrc = ( DataSource ) context.getAttribute( "conPool" );
Good luck !
----- Original Message -----
From: "Steven Dahlin" <sd...@cableone.net>
To: <st...@jakarta.apache.org>
Sent: Wednesday, January 01, 2003 3:42 PM
Subject: datasource problem
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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: "conPool" --> "ConPool" / Re: datasource problem
Posted by Steven Dahlin <sd...@cableone.net>.
That was a misttype on my part. In the code both have "conPool".
----- Original Message -----
From: "Liu Jian" <jl...@stny.rr.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, January 01, 2003 2:25 PM
Subject: "conPool" --> "ConPool" / Re: datasource problem
> Will the data-source key case-sensitive? "conPool" --> "ConPool"
>
> Try
>
> dsSrc = ( DataSource ) context.getAttribute( "conPool" );
>
> Good luck !
>
>
>
> ----- Original Message -----
> From: "Steven Dahlin" <sd...@cableone.net>
> To: <st...@jakarta.apache.org>
> Sent: Wednesday, January 01, 2003 3:42 PM
> Subject: datasource problem
>
>
> 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
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>