>>>>> "Steven" == Steven Dahlin <[EMAIL PROTECTED]> writes:
Steven> I am a little unclear what you mean by using modules?
If you don't know what they are, then you probably aren't using them :) .
It's a mechanism that allows you to subdivide your Struts application into
pieces, each with their own config file.
If you're not using modules, then I don't know what the problem could be.
Perhaps you could use your debugger to trace the loading of your
struts-config.xml file, especially when it stores the data-soure configuration?
David> ----- Original Message -----
David> From: "David M. Karr" <[EMAIL PROTECTED]>
>> >>>>> "Steven" == Steven Dahlin <[EMAIL PROTECTED]> writes:
>>
Steven> When I try to get a datasource which has been defined in the
Steven> struts-config.xml no matter what I do the datasource returns back null. My
Steven> struts-config.xml for data-sources is:
Steven> <data-sources>
>>
Steven> <data-source key = "conPool">
>>
Steven> <set-property property = "autoCommit"
Steven> value = "false"/>
Steven> <set-property property = "description"
Steven> value = "database source"/>
Steven> <set-property property = "driverClass"
Steven> value =
Steven> "oracle.jdbc.driver.OracleDriver"/>
Steven> <set-property property = "user"
Steven> value = "theuser"/>
Steven> <set-property property = "password"
Steven> value = "thepassword"/>
Steven> <set-property property = "url"
Steven> value =
Steven> "jdbc:oracle:thin:@192.192.192.192:1675:inst"/>
Steven> </data-source>
>>
Steven> </data-sources>
>>
Steven> In the section of code used for initialization of the
Steven> datasource there is the following:
>>
Steven> ServletContext context =
Steven> actSrv.getServletContext();
Steven> dsSrc = ( DataSource ) context.getAttribute(
Steven> "ConPool" );
>>
Steven> The context is captured but the datasource remains null.
>>
>> Are you using modules? The data-source is put into the ServletContext
David> with a
>> key that is constructed by appending the module prefix to the given key.
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED] ; SCJP
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>