当前位置: 技术问答>java相关
求救高手,帮帮我这个初学者,不胜感激!!!
来源: 互联网 发布时间:2017-03-30
本文导语: 高分求救。言出必行! 我把tomact配置好了以后例子可以运行但是我自己编的程序无法运行。求救高手!!! 我的用户变量设置为: classpath:e:PROGRA~1Borlandvbrokerlibvbcpp.jar;d:jdk1.4libtools.jar;d:jdk1.4libdt.jar;D:Program FilesApache ...
高分求救。言出必行!
我把tomact配置好了以后例子可以运行但是我自己编的程序无法运行。求救高手!!!
我的用户变量设置为:
classpath:e:PROGRA~1Borlandvbrokerlibvbcpp.jar;d:jdk1.4libtools.jar;d:jdk1.4libdt.jar;D:Program FilesApache Tomcat 4.0libservlet.jar;D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclasses
path:d:jdk1.4bin;d:jdk1.4
我的系统变量为:
classpath:d:jdk1.4libtools.jar;d:jdk1.4libdt.jar;D:Program FilesApache Tomcat 4.0libservlet.jar;D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclasses
path:e:PROGRA~1BorlandDelphi5ProjectsBpl;e:PROGRA~1BorlandvbrokerjreBin;e:PROGRA~1BorlandvbrokerBin;e:PROGRA~1BorlandDelphi5Bin;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;d:jdk1.4bin;d:jdk1.4;D:Program FilesMicrosoft SQL Server80ToolsBINN;d:jdk1.4bin;d:jdk1.4
我的jdk1.4装到d:,tomact装到d:/progarm filesapache tomact 4.0
已经用odbc建立了一个guestbook的系统数据源。
我把书上的例子(index.html,index.jsp,sql.java)拷到exmaples目录的jsp文件夹下,把sql.java拷到
examplesWEB-INFclasses下,运行后。index.html出现但我一按提交按钮,就出现以下状况:
好象是说class无法编译。
高手求就。我的头都快大了。
Apache Tomcat/4.0.4 - 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
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:5: Class or interface declaration expected.
import javax.servlet.*;
^
error: File D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclassessql.class does not contain type sql as expected, but type sql_data. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:4: Class sql not found in import.
import sql;;
^
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:11: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.index$jsp not found.
public class index$jsp extends HttpJspBase {
^
4 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
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:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
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:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
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:468)
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:174)
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:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------
我把tomact配置好了以后例子可以运行但是我自己编的程序无法运行。求救高手!!!
我的用户变量设置为:
classpath:e:PROGRA~1Borlandvbrokerlibvbcpp.jar;d:jdk1.4libtools.jar;d:jdk1.4libdt.jar;D:Program FilesApache Tomcat 4.0libservlet.jar;D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclasses
path:d:jdk1.4bin;d:jdk1.4
我的系统变量为:
classpath:d:jdk1.4libtools.jar;d:jdk1.4libdt.jar;D:Program FilesApache Tomcat 4.0libservlet.jar;D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclasses
path:e:PROGRA~1BorlandDelphi5ProjectsBpl;e:PROGRA~1BorlandvbrokerjreBin;e:PROGRA~1BorlandvbrokerBin;e:PROGRA~1BorlandDelphi5Bin;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;d:jdk1.4bin;d:jdk1.4;D:Program FilesMicrosoft SQL Server80ToolsBINN;d:jdk1.4bin;d:jdk1.4
我的jdk1.4装到d:,tomact装到d:/progarm filesapache tomact 4.0
已经用odbc建立了一个guestbook的系统数据源。
我把书上的例子(index.html,index.jsp,sql.java)拷到exmaples目录的jsp文件夹下,把sql.java拷到
examplesWEB-INFclasses下,运行后。index.html出现但我一按提交按钮,就出现以下状况:
好象是说class无法编译。
高手求就。我的头都快大了。
Apache Tomcat/4.0.4 - 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
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:5: Class or interface declaration expected.
import javax.servlet.*;
^
error: File D:Program FilesApache Tomcat 4.0webappsexamplesWEB-INFclassessql.class does not contain type sql as expected, but type sql_data. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:4: Class sql not found in import.
import sql;;
^
D:Program FilesApache Tomcat 4.0workStandalonelocalhostexamplesjspsqlindex$jsp.java:11: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.index$jsp not found.
public class index$jsp extends HttpJspBase {
^
4 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
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:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
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:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
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:468)
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:174)
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:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------
|
用resin把