db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bila" <bi...@symbol.com>
Subject RE: how to write a torque.init servlet
Date Fri, 07 Nov 2003 19:19:02 GMT
and do you add it to the web.xml? Sorry I'm new @ this.

>>> mkucera@bbm.ca 11/07/03 02:16PM >>>

I use a context listener to initialize torque. It looks something like the
following:


public final class ContextListener implements ServletContextListener
{
    public void contextInitialized(ServletContextEvent event)
    {
        ServletContext context = event.getServletContext();
        String realPath = context.getRealPath("/");
        String torqueConfigFile = "/WEB-INF/Torque.properties";
        Torque.init(realPath + torqueConfigFile);
    }

    public void contextDestroyed(ServletContextEvent event)
    {
    }
}


-----Original Message-----
From: Michael Bila [mailto:bilam@symbol.com] 
Sent: Friday, November 07, 2003 12:31 PM
To: torque-user@db.apache.org 
Subject: 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.

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


________________________________________________________________________
This email has been scanned for computer viruses.


________________________________________________________________________
This email has been scanned for computer viruses.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message