事情是这个样子的:
环境搭建:
在eclipse官网下eclipse EE
然后下载eclipse中的tomcat插件
这时打开eclipse会发现菜单栏没有tomcat选项
将插件解压后放在eclipse目录下的plugins文件夹下
重启eclipse,可以看到eclipse中出现了tomcat选项
Window->proferences->tomcat->Version7.x->Browse选择tomcat安装目录->Apply->OK
环境配置“完毕”
新建项目测试
新建Dynamic Web Project项目
新建jsp文件
问题出现了
在jsp文件第一行报The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误
解决办法:
Window-〉proferences->server->Runtime Envirnments->add->apache->apache tomcat v7.0->next->路径->ok->OK
单击项目->右键单击->Build Path->Configure Build Path->java Build Path->Libraries->add Library->Server Runtime->next->选中Apathe Tomcat v7.0->Finish->OK
错误不见了
Good LUCK