当前位置: 技术问答>java相关
找不到.class文件,大家帮帮我呀,赶做毕业设计呢,以身相许了.
来源: 互联网 发布时间:2015-05-24
本文导语: 我做了一个很小的程序,可他总提示说找不到.class文件.我的CLASSPATH是d:jdk1.3.1libtools.jar;d:jdk1.3.1libdt.jar;D:Apache Tomcat 4.0webappsexamplesweb-infclasses;D:Apache Tomcat 4.0lib 文件放到了D:Apache Tomcat 4.0webappsexamplesjsp下,.CLASS文件放到...
我做了一个很小的程序,可他总提示说找不到.class文件.我的CLASSPATH是d:jdk1.3.1libtools.jar;d:jdk1.3.1libdt.jar;D:Apache Tomcat 4.0webappsexamplesweb-infclasses;D:Apache Tomcat 4.0lib
文件放到了D:Apache Tomcat 4.0webappsexamplesjsp下,.CLASS文件放到了D:Apache Tomcat 4.0webappsexamplesWEB-INFclasses下,提示信息为Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error..........Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
--------------------------------------------------------------------------------
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:60: Class org.apache.jsp.EnterBean not found.
EnterBean enter = null;
^
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:63: Class org.apache.jsp.EnterBean not found.
enter= (EnterBean)
^
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:68: Class org.apache.jsp.EnterBean not found.
enter = (EnterBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "EnterBean");
^
An error occured between lines: 8 and 23 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:98: Method PasswordIsRight() not found in class org.apache.jsp.EnterChoice$jsp.
if(!PasswordIsRight())
^
An error occured between lines: 8 and 23 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:105: Variable StudentID may not have been initialized.
StudentID=request.getParameter(StudentID);
^
Note: D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java uses or overrides a deprecated API. Recompile with "-deprecation" for details.
5 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------
文件放到了D:Apache Tomcat 4.0webappsexamplesjsp下,.CLASS文件放到了D:Apache Tomcat 4.0webappsexamplesWEB-INFclasses下,提示信息为Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error..........Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
--------------------------------------------------------------------------------
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:60: Class org.apache.jsp.EnterBean not found.
EnterBean enter = null;
^
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:63: Class org.apache.jsp.EnterBean not found.
enter= (EnterBean)
^
An error occurred at line: 3 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:68: Class org.apache.jsp.EnterBean not found.
enter = (EnterBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "EnterBean");
^
An error occured between lines: 8 and 23 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:98: Method PasswordIsRight() not found in class org.apache.jsp.EnterChoice$jsp.
if(!PasswordIsRight())
^
An error occured between lines: 8 and 23 in the jsp file: /jsp/EnterChoice.jsp
Generated servlet error:
D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java:105: Variable StudentID may not have been initialized.
StudentID=request.getParameter(StudentID);
^
Note: D:Apache Tomcat 4.0worklocalhostexamplesjspEnterChoice$jsp.java uses or overrides a deprecated API. Recompile with "-deprecation" for details.
5 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------
|
我觉得问题出在这句。
将.JAVA文件中加入一句:package bean;
然后在Apache Tomcat 4.0webappsrootweb-infclasses目录下建一bean目录,并把CLASS拷到这目录下。
将上面这句改为:
问题搞定,记得给分