db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jian Dai" <jack2...@comcast.net>
Subject RE: Configure Torque for Struts
Date Tue, 05 Aug 2003 04:33:51 GMT
I tried to put that file in TOMCAT_HOME. It did not work for me. 
I am going to try Amit's method later. 

Thank you guys very much for the nice help. 

Jack

-----Original Message-----
From: Amit Rana [mailto:rana@solis.jp]
Sent: Monday, August 04, 2003 9:25 PM
To: 'Apache Torque Users List'
Subject: RE: Configure Torque for Struts


We initially put it in WEB-INF/conf and recently moved it to a package.
Where ever we put it I think main problem is in passing the file name to
Torque.init method.

We are doing that with an initialization servlet which is loaded on
server startup and initializes Torque (alternatively, you can initialize
Torque when needed).

Simple code to initialize is:
Torque.init(getServletContext_or_request.
getRealPath("WEB-INF/conf/Torque.properties"));

Comments are welcome.

Regards,
Amit.

> -----Original Message-----
> From: Brian Adams [mailto:bigb@satx.rr.com]
> Sent: Tuesday, August 05, 2003 1:11 PM
> To: Apache Torque Users List
> Subject: RE: Configure Torque for Struts
> 
> ah I see.  I had trouble with it and I finally got it running by
dropping
> the file in TOMCAT_HOME.
> I know this is not good but I just left it for now.  Thanks for
reminding me
> about that I will put this on my TODO for fixing. I do not know how to
put
> it in the webapp and get it to work.
> Does anyone on the LIST know?
> B
> 
> -----Original Message-----
> From: Jian Dai [mailto:jack2110@comcast.net]
> Sent: Monday, August 04, 2003 11:09 PM
> To: Apache Torque Users List
> Subject: RE: Configure Torque for Struts
> 
> 
> Hi, Brian:
> 
> Basically, I need to figure out where I can put the Torque.properties
> file in Struts.  In your case, after you generate the OM classes and
put
> them into your project, I guess you still need to configure this
property
> file so that your OM classes can realize it during runtime. My
question is
> how you did it
> 
> Thanks a lot for nice help.
> 
> Jack
> 
> -----Original Message-----
> From: Brian Adams [mailto:bigb@satx.rr.com]
> Sent: Monday, August 04, 2003 8:48 PM
> To: Apache Torque Users List
> Subject: RE: Configure Torque for Struts
> 
> 
> Hey Jack, I am not sure what you mean.  I am using Torque with Struts
and I
> use a bean class that contains my Business Logic it makes calls to the
> Object Model classes.  I keep the entire Torque package in another
area and
> when I gen the OM Classes for my project it creates them in my project
area.
> Does that make sense?
> Brian
> 
> -----Original Message-----
> From: Jian Dai [mailto:jack2110@comcast.net]
> Sent: Monday, August 04, 2003 7:54 PM
> To: Apache Torque Users List
> Subject: Configure Torque for Struts
> 
> 
> Hi, all:
> 
> I am planning to use Torque as data module in
> Struts architecture. Is there anybody who knows
> how to configure torque for struts?
> 
> Many thanks for the nice help.
> 
> Jack
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message