I have deployed Torque-based applications via EAR on Websphere 4.0 and
via WAR on Tomcat 4.0 and 4.1 - in both cases I am using a relatively
standard properties file to contain Torque properties. Create a
servlet whose only purpose is to initialize torque - set a parameter
containing the context-relative path of the configuration file, use
getRequest().getRealPath("/") and append the context-relative path to
get the complete path, and make sure the servlet is load-on-startup.
-----Original Message-----
From: Robles, Rogelio [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 7:18 PM
To: 'Apache Torque Users List'
Subject: RE: Configure Torque for Struts
> -----Original Message-----
> From: Keeney, Thomas [mailto:[EMAIL PROTECTED]
...
>
> Hello All,
>
> If you want to retrieve Torque.properties to pass into
> Torque.init(), just
> load it from the classpath.
>
> i.e. put Torque.properties into WEB-INF/classes
>
> then use the following code:
> URL propsFile =
> this.getClass().getClassLoader().getResource("Torque.properties");
> Torque.init(propsFile.getPath());
>
If I want to do an .EAR (or .WAR only) deployment of a Torque based app
I need Torque to read its properties using an InputStream (with the help
of
getClassLoader().getResourceAsStream()) is that directly supported by
Torque? if is not directly what do you do for a deployment scenario like
that?
Rogelio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]