Hi all.

Maybe this isn't a good list for this, but here goes.

I know how to define <load-on-startup> for a Java Web Application, no problem there. My question is how do I do it for a Struts application?

The trick is, I'd like to load some application parameters from the DB into the application scope. And the DB access definition is in the Struts DataSource. Due to restrictions on the server setup, I cannot have the admin setup a norma DataSource form my context, so I'm forced to use Struts' implementation. Don't warry, I'm not using the dumb GenericDataSource, but normal DBCP. It's just not defined in server.xml, but in ./WEB-INF/struts-config.xml

So, my problem is, if I have a servlet that starts on application load, how can it access Struts' config and access the DB? I'd hate to have to hardcode DB access stuff.

One thing that pops into mind is a servlet that uses HTTP client to trigger a load action, but it is un-elegant.

Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to