+1 Netbeans is a great environment to work in and very easy to config BUT when adding any library it is important to know which classloader you will be using http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html System - generally for libraries utilised during Tomcat bootup Catalina - generally for libraries utilised by the Catalina container (you can configure in other webapp containers) Common - generally for libaries which will be commonly used for ALL webapps WEB-INF/lib - generally for libraries used for just the web application
When your app is looking for a class the search order is a.. Bootstrap classes of your JVM b.. System class loader classses (described above) c.. /WEB-INF/classes of your web application d.. /WEB-INF/lib/*.jar of your web application e.. $CATALINA_HOME/common/classes f.. $CATALINA_HOME/common/endorsed/*.jar g.. $CATALINA_HOME/common/i18n/*.jar h.. $CATALINA_HOME/common/lib/*.jar i.. $CATALINA_BASE/shared/classes j.. $CATALINA_BASE/shared/lib/*.jar if you experience difficulty loading a class its because the class is being used by either Tomcat or a webapp or both (its important to not load the same jar in more than one classloader path) HTH, Martin-- --------------------------------------------------------------------------- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --------------------------------------------------------------------------- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Tomcat Users List" <users@tomcat.apache.org> Sent: Sunday, March 25, 2007 4:54 AM Subject: Re: Question about lib folder of Webapps Too much pain... get yourself Netbeans, doing everything by hand is near impossible. In netbeans you can drop in your libs, make your JSP, debug it and deploy it. Good luck ----- Original Message ----- From: Evrim Agha To: Tomcat User Sent: Sunday, March 25, 2007 9:09 AM Subject: Question about lib folder of Webapps Hi everyone I'd like to build a JSP to use and show results of using Sparql + Jena + Pellet libraries. I have set up a directory called MyFirstTestDir in [TomcatDir]\webapps. Inside MyFirstTestDir, I have created a folder called WEB-INF which has a folder called lib; So I have: [TomcatDir]\webapss\MyFirstTestDir\WEB-INF\lib inside lib, I have copied all the files in lib folder of jena download + pellet download. Extremely appreciate your help with these questions: Some of the Jena jar files and Sparql jar files share the same name; therefore I can not copy them directly to lib. Could you please advise what should I do? I am using winxp and tomcat 6. Thank you in advance. ------------------------------------------------------------------------------ --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]