ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manav Gupta <Manav.Gu...@cramer.com>
Subject Setting tomcat classpath
Date Mon, 09 Jun 2003 16:34:55 GMT
Hi,
 
How do you set the classpath for tomcat? 
 
I have some libraries that I want tomcat to use when its startsup, and have
placed them such that they are copied to the WEB-INF/lib folder. However,
tomcat does not seem to use them (or one of them at least). It works if the
jar is mentioned explicitly on the classpath. 
 
Is there are a workaround for this? I don't see how to modify the
setclasspath.bat - I don't think that's something that I would do in the
production environment. 
 
Additionally, I'm not too sure about the classloader behaviour for classes
mentioned in the classpath and/or the lib folder (which is mandatory, which
one works, etc). Any pointers on this regard as well?
 
I am using tomcat 4.1.24 with jdk 1.4.1_02  and I start tomcat using a
custom task (snippet below): 
==============
public void execute() throws BuildException {
        try {
             /* dir must be specified */
            if (dir == null) throw new BuildException("dir parameter
isrequired");
             /* Launch tomcat */
            File dirf = new File(dir + "/bin");
            String[] cmd = new String[3];
            cmd[0] = "cmd";
            cmd[1] = "/c";
            cmd[2] = "startup";
            Process proc = Runtime.getRuntime().exec(cmd, null, dirf);
            proc.waitFor();
        }
        catch (Exception ex) {
            throw new BuildException(ex);
        }
    }
==============
 
Many Thanks,
M.
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message