struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <>
Subject RE: how to get JDBC source defined in struts in another servlet
Date Fri, 20 Dec 2002 18:50:59 GMT
I'm sure you could just grab in out of the servletContext.

James Mitchell
Software Engineer/Struts Evangelist

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg." 
- Bjarne Stroustrup

> -----Original Message-----
> From: Sash Sash [] 
> Sent: Friday, December 20, 2002 12:52 PM
> To:
> Subject: how to get JDBC source defined in struts in another servlet
> Hi,
> I would like to create a servlet that loads specific 
> resources (puts beans into app context to be used by jsp's 
> and action classes) when the webapp first launches.  For this 
> task I require a JDBC source that is defined in the struts 
> config file.   How can I get this datasource in my servlet?  
> If I understand correctly, the action servlet initializes the 
> datasource on startup and is available via findDatasource().  
> Any suggestions?  Can I get an Action Servlet executed once 
> via config file?  Thanks in advance for any assistance you 
> can provide!!!
> ---------------------------------
> Post your free ad now! Yahoo! Canada Personals

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message