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 Michael Bila <bi...@symbol.com> on 2003/11/07 18:30:58 UTC
how to write a torque.init servlet
does anyone have an example of a torque init servelt for postgress and tomcat?
thanks
________________________________________________________________________
This email has been scanned for computer viruses.
Re: how to write a torque.init servlet
Posted by Michael Della Bitta <md...@earthlink.net>.
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