Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set the tomcat's classpath?/

 
Tony Ge
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 20
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Pie
    Posts: 18212
    53
    Android Eclipse IDE Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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.
     
    prashant parab
    Greenhorn
    Posts: 17
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic