Two things:
1.
You should create the project as a "Dynamic Web Project" and create a server for this project.
OR
2. Have the jar files with Servlet APIs included in the build path of Eclipse. If you are using Tomcat, then the jar files you need are:
Tomcat Installation Folder\common\lib\servlet-api.jar
and
Tomcat Installation Folder\common\lib\jsp-api.jar
[ April 30, 2007: Message edited by: Sunil Vasudevan ]