问题(使用eclipse初次创建jsp文件)the superclass"javax.servlethttp.httpservlet" was not found on the java build path

在window->preference->输入jsp->找到jsp files->encoding (utf-8)

发现文件出现×,the superclass"javax.servlethttp.httpservlet" was not found on the java build path

方法1:在eclipse-》apache-tomcat-x.x.xx》->lib  找到jsp-api.jar,servlet-api.jar复制

粘贴到web-inf下的lib .错误消失。

 

使用jsp-api.jar,servlet-api.jar的目的:

eclipse中关键词读取所在包,用于提示关键词

快捷键Alt+

 

 

养成好习惯

每次打开软件eclipse后首先检查编码方式是否为utf-8

    

 

如何在<%

           换行<br>而不是/n

           %>

 

在每次调试后,记得关闭红色方块servlet,不然下次重新再开servlet.进程太多相互影响。

 

posted on 2020-06-09 21:35    阅读(144)  评论(0编辑  收藏  举报