Create a class which doles out connections. Instantiate the class using a struts plugin and have a static method which can be called from anywhere to get a new connection. You can use this for JNDI connections, struts connections or have a properties / XML configuration file to locate a connection. This is useful for testing business classes as well. Just try to find a connection from any of the possible places (of course try the one you are going to use in production first).
Edgar -----Original Message----- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 11:08 AM To: '[EMAIL PROTECTED]' Subject: get data source in servlet Hi, I have defined a data source in my struts-config file, which is working fine as i get the connection in my Action class, but i need to get the data source in a Servlet, can any one provide with the code to get the data source in servlet Ashish __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]