| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 598 人关注过本帖
标题:急呀!初学 jsp老是运行出错,郁闷呀!
只看楼主 加入收藏
wulishengedu
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-10-6
收藏
 问题点数:0 回复次数:3 
急呀!初学 jsp老是运行出错,郁闷呀!
急呀!初学 jsp老是运行出错,请高手多多指教:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 2 in the jsp file: /class/index.jsp

Generated servlet error:
    [javac] Compiling 1 source file

D:\Tomcat 4.1\work\Standalone\localhost\_\class\index_jsp.java:66: package db does not exist
      db.db cn = null;
        ^



An error occurred at line: 2 in the jsp file: /class/index.jsp

Generated servlet error:
D:\Tomcat 4.1\work\Standalone\localhost\_\class\index_jsp.java:68: package db does not exist
        cn = (db.db) pageContext.getAttribute("cn", PageContext.PAGE_SCOPE);
                ^



An error occurred at line: 2 in the jsp file: /class/index.jsp

Generated servlet error:
D:\Tomcat 4.1\work\Standalone\localhost\_\class\index_jsp.java:71: package db does not exist
            cn = (db.db) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "db.db");
                    ^
3 errors


	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:534)


Apache Tomcat/4.1.31 总是出现这样的提示!郁闷呀!郁闷呀!郁闷呀!郁闷呀!郁闷呀!

搜索更多相关主题的帖子: jsp 初学 运行 
2005-10-06 21:02
jeremydomett
Rank: 2
等 级:新手上路
威 望:3
帖 子:312
专家分:0
注 册:2004-6-10
收藏
得分:0 
程序发一下啊..

热爱编程........永不放弃.........
2005-10-08 14:35
我爱小叶
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-5-20
收藏
得分:0 
程序发一下,才能下结论啊,HTTP Status 500 - 这种现象有很多比如:语法错误(丢失语句分隔符、没有定义变量或变量定义错误、丢失花括号。。)。逻辑错误,编译错误!
2006-05-20 10:51
yangwudong
Rank: 3Rank: 3
等 级:新手上路
威 望:7
帖 子:244
专家分:0
注 册:2005-8-18
收藏
得分:0 

又一个,import导包db.db,注意!


别做程序了,给你们一个赚钱的秘诀。做豆腐;if 做硬了 then 卖豆腐干;if 做稀了 then 卖豆腐花;if 太稀了 then 卖豆浆;if 豆腐卖不动了放几天 then 卖臭豆腐; else if 还卖不动放坏了 then 卖腐乳;
2006-05-20 17:03
快速回复:急呀!初学 jsp老是运行出错,郁闷呀!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026634 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved