You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Ramesh R <ra...@principalconsulting.net> on 2007/12/16 20:06:21 UTC

How to configure torque for struts

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


Re: How to configure torque for struts

Posted by Anas Mughal <an...@gmail.com>.
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 <ra...@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