simply copy the servlet-api.jar and copy that jar files into lib folder, which is in WEB-INF. then just clean and built your project, your errors will be solved.
**OR**
directly add jar files to library by using following steps.
Right click on project.
Go To Properties.
Go to Java Build Path.
Select Add Library option from tabs.
Add Jar Files
give path of your servlet-api.jar file.
Clean and build your project.