Struts-config.xml
DataSource ds=(DataSource)this.getServlet().getServletContext().getAttribute(“data”); Connection con=ds.getConnection();