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
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
2 matches
Mail list logo