当前位置: 技术问答>java相关
Tomcat3.1工作正常,但是到tomcat4.0.4就出问题了
来源: 互联网 发布时间:2015-07-29
本文导语: Tomcat3.1工作正常,但是到tomcat4.0.4就出问题了,出错信息如下:org.apache.jasper.JasperException: Unable to compile class for JSP K:Program FilesApache Tomcat 4.0workStandalonelocalhost_plan$jsp.java:4: Class or interface declaration expected. import javax...
Tomcat3.1工作正常,但是到tomcat4.0.4就出问题了,出错信息如下:org.apache.jasper.JasperException: Unable to compile class for JSP
K:Program FilesApache Tomcat 4.0workStandalonelocalhost_plan$jsp.java:4: Class or interface declaration expected.
import javax.servlet.*;
^
K:Program FilesApache Tomcat 4.0workStandalonelocalhost_plan$jsp.java:10: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.plan$jsp not found.
public class plan$jsp extends HttpJspBase {
^
2 errors
哪位大侠解决了这个问题马上给100分,决不食言.
K:Program FilesApache Tomcat 4.0workStandalonelocalhost_plan$jsp.java:4: Class or interface declaration expected.
import javax.servlet.*;
^
K:Program FilesApache Tomcat 4.0workStandalonelocalhost_plan$jsp.java:10: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.plan$jsp not found.
public class plan$jsp extends HttpJspBase {
^
2 errors
哪位大侠解决了这个问题马上给100分,决不食言.
|
显然是servlet.jar包的问题,错误显示没有找到javax.servlet.*以及HttpJspBase类,这些都是jsp的东东,没有谈到数据库访问的内容,哪来数据库的问题,建议重新下载一个servlet.jar包,将它放到某个盘的根目录下加到ClassPath中重启Tomcat试试。
哦,对了,HttpJspBase是jasper-runtime.jar中的类,看看你的Tomcat在$TomcatHomeDir$lib目录下是否有这样的包。Good luck ,^_^!
哦,对了,HttpJspBase是jasper-runtime.jar中的类,看看你的Tomcat在$TomcatHomeDir$lib目录下是否有这样的包。Good luck ,^_^!
|
是不是servlet.jar包没有包含进classpath
|
JAVAX好象是JAVAMAIL的CLASS. 可能是JAVAMAIL的CLASS 没有放到CLASSPATH中
|
就是没有找到那东西嘛,检查CLASSPATH