aspose file tools*
The moose likes Servlets and the fly likes how to set the tomcat's classpath?/ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to set the tomcat Watch "how to set the tomcat New topic
Author

how to set the tomcat's classpath?/

Tony Ge
Greenhorn

Joined: Sep 05, 2001
Posts: 20
the servlet in IDE complies ok,but in browers occurs errors,I think it is the tomcat's classpath 's problem!!
My OS is win200 prefessional,I had set the classpath on OS,but the tomcat didn't catch the os'classpath,so I want to set the classpath in tomcat,i add the "set classpath=......" in tomcat_folder/bin/startup.bat ,but no effect,the tomcat's ver is 4!!
how to set the tomcat's classpath?/
thanx!!!
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

In general an Application needs to ignore the classpath and manages it itself. The reasoning is so that the application server can serve multiple applications at a single time and manage the resources that are available to each application.
Therefore you will find that , any
  • any classes in [ TOMCAT HOME ]/classes directory will be available to all applications
  • any jars in the [ TOMCAT HOME ]/lib directory will be available to all applications
  • any class in the [TOMCAT HOME ]/webapps/[ CONTEXT ]/web-inf/classes will only be available within that context and
  • any jar in the [TOMCAT HOME ]/webapps/[ CONTEXT ]/web-inf/lib will only be available within that context


  • DOM
    Tony Ge
    Greenhorn

    Joined: Sep 05, 2001
    Posts: 20
    thanx David O'Meara !
    but fro some reason,the class will be used doesn't under the $tomcat_home$,so I will import the other package(outside the $tomcat_home$)!!
    thanx!!
    Tim Holloway
    Saloon Keeper

    Joined: Jun 25, 2001
    Posts: 16303
        
      21

    App server classpaths will probably result in my losing what little sanity I still possess some day .
    However, it appears I'm not alone. Check the online documentation for your version of Tomcat at http://jakarta.apache.org/tomcat - both versions 3 and 4 give very detailed info on what classpaths are seen at various points in Tomcat and its apps.


    Customer surveys are for companies who didn't pay proper attention to begin with.
    prashant parab
    Greenhorn

    Joined: Jan 10, 2002
    Posts: 17
    u can edit tomcat.sh or tomcat.bat file located at TOMCAT_HOME/bin/ directory , and append what classpath u want in the existing classpath
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: how to set the tomcat's classpath?/