db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anas Mughal" <anasmug...@gmail.com>
Subject Re: How to configure torque for struts
Date Mon, 17 Dec 2007 22:23:33 GMT
Here is a sample torque properties file:

torque.database.default=webmodel
torque.database.webmodel.adapter=oracle

torque.dsfactory.webmodel.factory =
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.webmodel.connection.driver =
oracle.jdbc.driver.OracleDriver
torque.dsfactory.webmodel.connection.url = jdbc:oracle:oci:@localhost
:1521:xe
torque.dsfactory.webmodel.connection.user = webm
torque.dsfactory.webmodel.connection.password = webm



In your startup serlvet init, put this code:


        try {
            Torque.init("torque.properties");
        }
        catch (TorqueException te) {
            System.out.println("Torque Exception caught: " + te.getMessage()
);
        }


That is all that is needed.
--
Anas Mughal





On Dec 16, 2007 2:06 PM, Ramesh R <rameshr@principalconsulting.net> wrote:

> Hi,
>
>
>
> I am using torque for struts application. I am currently finding difficult
> configuring torque. Please guide me in how to do this.
>
>
>
>
>
> Thanks
>
>
>
> Ramesh r
>
>


-- 
Anas Mughal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message