db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Della Bitta <mdellabit...@earthlink.net>
Subject Re: how to write a torque.init servlet
Date Fri, 07 Nov 2003 19:18:12 GMT
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.torque.*;

public class InitServlet extends HttpServlet {

     public void init() throws ServletException {

         try {
             Torque.init("/path/to/Torque.properties");

         } catch (TorqueException te) {
             throw new ServletException("ERROR - Unable to init  
Torque.", te);

         }
     }

}


that's sort of hacky... realistically, you should be getting the path  
to the Torque.properties file from your deployment descriptor. That  
will get you started, though.

Michael

On Nov 7, 2003, at 12:30 PM, Michael Bila wrote:

> does anyone have an example of a torque init servelt for postgress and  
> tomcat?
>
> thanks
>
>
>
> _______________________________________________________________________ 
> _
> This email has been scanned for computer viruses.


---------------------------------------------------------------------
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