servlet-api.jar 和 jsp-api.jar报错 和 The superclass "javax.servlet.http.HttpServlet" was not
来源:互联网 发布:浙师大行知学院 兰溪 编辑:程序博客网 时间:2024/05/19 06:18
这两个包都是各个应用服务器专有的,Javax下的包都属于第三方,Sun只是提出接口规范,所有的第三方应用服务器厂商都有自己的实现。
也就是说,当我用eclipse导入(import)一个工程时,并没有这两个包,刚开始会看到工程jsp第一行报错,这时只要修改一个工程buildpath就行。具体如下:
右键工程->Build Path->Configure Build Path后进入如下页面:
在左边选择Java Build Path,然后在右边选择Add Library后进入如下页面:
选择Server Runtime,点击Next:
选择你的运行环境就行后点击finish就行。
然后clean一下tomcat,可以看到大部分错误消失。如果此时某个jsp页面还报错,出现类似这种:The superclass "javax.servlet.http.HttpServlet" was not found 的信息,那最简单的办法就是把这个jsp页面的代码先Ctrl x再Ctrl v就行,就是稍微改一下代码再改回来就行,原因是tomcat的运行机制:一般情况下,JSP引擎会检查JSP文件对应的servlet是否已经存在,并且检查JSP文件的修改日期是否早于servlet.如果JSP文件的修改日期早于对应的servlet,那么容器就可以确定JSP文件没有被修改过并且servlet有效.。我们要告诉tomcat这个jsp页面修改过,然后它会把它重新编译成servlet。
0 0
- servlet-api.jar 和 jsp-api.jar报错 和 The superclass "javax.servlet.http.HttpServlet" was not
- Jsp页面报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java
- Jsp页面报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java
- jsp报错,The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 新建JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path.(jsp页面报错)
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- jsp 报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path"
- JSP报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- 新建jsp报错“The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”
- Eclipse导入JSP报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java
- 新建jsp报错“The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path”
- sql实现分组并排序
- Postgresql 9.4.0-1 x64 win7 解压版安装步骤
- ssh连接数据库出现的问题
- 使用SQL Case 的例子
- android 自适应国际化语言
- servlet-api.jar 和 jsp-api.jar报错 和 The superclass "javax.servlet.http.HttpServlet" was not
- 彻底解决 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- log4j详解
- Android开发二:Activity之间跳转的四种launchMode
- OLE 常用方法和属性
- itk 读图像 c++ 0xC0000005: Access violation reading location 0x00000000 出错总结
- solrcloud基本知识
- 超级表格漂流记
- 友善6410开发板RS232改RS485(内核驱动修改)