Hi
I have an initialisation servlet which is run when my web app start up.
public class WebAppInit extends HttpServlet
{
public void init()
{
}
}
All it does is to set some application wide beans. I need to be able to
access the database I have defined in my struts-config.xml file in this initalisation
servlet. I
can access this database from my Action classes via
public final class Logon extends Action
{
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
DataSource dataSource = servlet.findDataSource("testDataBase");
}
}
since this class extents Action but do not know how to access this database
via the WebAppInit class. How can I access the database from the
WebAppInit class.
--
Cheers
Tony
---------------------------------------------------------------------
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>