Adding servlet-api.jar to Eclipse project

As you may know, if you have servlets in you Java project you need to add servlet-api.jar to you Web App Libraries. Since I don’t work in Eclipse very often, I always keep forgetting how to do it. So, here is a short instruction with pictures.

Go to Web App Libraries/Build Path/Configure Build Path…


Click Add External JARs…


Find and choose the servlet-api.jar file. It should be located in the lib folder of your Tomcat. In my case the path to the file is:



Leave a Reply

Your email address will not be published. Required fields are marked *