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!!!
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
Joined: Sep 05, 2001
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!!
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.
An IDE is no substitute for an Intelligent Developer.