I am working through the online book CoreServlets. I am at the point in the examples where I need to add .jar to the projects to support import org.apache.commons.beanutils.BeanUtils; from the Apache library. Chapter 4, BeanUtilities.java., sourcecode in online at http://volume1.coreservlets.com/archive/Chapter4.html
If I use Netbeans and point the project to where the Apache libraries are installed the BeanUtilities.java servlet compiles fine but the project will not run on Tomcat. I posted on the Netbeans forum and they said to add the individual .jar files to the project folder /WEB-INF/lib. I did that and took out the pointer to the libraries in the Apache install and now the servlet won't compile even through the Netbeans project can see the .jar files. I posted again to the Netbeans list but didn't get further suggestions.
So I thought I would try Eclipse, I have Ganymede. Eclipse sees the .jar but even though Eclipse says the Tomcat server is installed and is mapped to the Tomcat folders when I try to run a page from the project Eclipse can't load Tomcat. I know the Tomcat is a good install on my machine because Netbeans runs it just fine to test the pages I am writing.
I have had other problems adding external .jars to projects in Netbeans when I was using examples for Java Servlet Programming, 2nd Edition by Jason Hunter. Netbeans seems friendlier to me than Eclipse but I will use any IDE that works.
Any suggestions about working with this issue on Netbeans or Eclipse would be welcome.
Thanks for answering. In Netbeans my Tomcat installation has problems with libraries that are added to the project. I tried putting them in several places including the project directory and the Tomcat\lib directory but Tomcat didn't find them and said the classes were missing. I have JBoss installed on my machine so I told the project to use JBoss instead of Tomcat and now the project is working and has no problems finding the extra .jar files that I added to the project. This may be a problem down the road because the actual web server has Tomcat not JBoss and I haven't tried deploying yet. (I am very new at web apps.) I have been able to access the postgresql database that is on the web server from my development machine so at least part of it is working.