Home
Blog
Tech How To

Managing Java Libs with Eclipse

Well I spend a bit of time figuring out how to add libraries to eclispe and finding the tomcat servlet libraries.

First I'll give the location of some key Tomcat jars

If eclipse is having trouble resolving javax.servlet.HttpServletRequest or javax.servlet.HttpServletResponse you only need one library

  $CATALINA_HOME/common/lib/servlet-api.jar
  1. Right click on the top level project folder
  2. Click on "Build Path"
  3. Click on "Configure Build Path"
  4. A window pops up, in the dialog box pick the "Libraries" tab
    • click on "Add Library"
  5. Another window pops up with a dialog box, select "User Libraries" and click next
  6. The infocus window changes showing the existing libraries
    • click on "User Libraries"
  7. The infocus window changes again, select "New"
  8. enter the name of your library
  9. Now select your new library and select "Add Jars"
    • go add your jars


I have two libraries, one for my local jars under WEB-INF/lib and one for the Tomcat common jars.