hi
I would like to access the DataSource object from a plugin in my Struts
application.
I use struts 1.2 with modules.
In the root struts-config.xml the data source is discribe as :
<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource"
key="dataBase1">
<set-property property="driverClassName"
value="org.gjt.mm.mysql.Driver" />
<set-property property="url"
value="jdbc:mysql://192.168.0.25/cvdunet" />
<set-property property="username" value="jdbcuser"/>
<set-property property="password" value="cvdunet" />
</data-source>
</data-sources>
And in my plugin, i call this :
DataSource aDataSource = (DataSource)
actionServlet.getServletContext().getAttribute (Globals.DATA_SOURCE_KEY);
but 'aDataSource' is 'null'.
Do you know the right way to access the DataSource ?
Thanks
Thibaut Lassalle
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]