thank you for your help. I find the solution.
To access to database in a plugin method you can do:
javax.sql.DataSource aDataSource =
(DataSource)servletc.getServletContext().getAttribute("dataBase1");
where dataBase1 is the key witch identify the data-source in the
struts-config.xml
Martin Gainty a écrit :
Thibault-
Have you had the opportunity to look at
http://www.docjar.com/html/api/org/apache/struts/action/ActionServlet.java.html
?
This is a customised ActionServlet which initialises data-sources thru
initModuleDataSources method
and the initModulePlugIns method which initialises the PlugIns found
in the config file
Is there a specific plugin you wish to use?
Bonne Chance,
Martin-
----- Original Message ----- From: "Thibaut Lassalle"
<[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, June 06, 2005 10:20 AM
Subject: access to dataSource configured in struts-config.xml in a Plugin
hi, i'd like to access to dataSource configured in struts-config.xml
in the Plugin init method.
But i don't have a clue how to do that.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]