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…

screen-shot-2016-09-11-at-21-31-16

Click Add External JARs…

screen-shot-2016-09-11-at-21-30-40

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:

/usr/local/apache-tomcat-8.0.33/lib/servlet-api.jar

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

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