标题:[求助]问个问题,不知道是什么错误!
只看楼主
listen2004
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2004-10-7
 问题点数:0 回复次数:2 
[求助]问个问题,不知道是什么错误!

各位帮我看看错误是什么,谢谢了,我搞了半天也不知道错在哪儿!

代码 : <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" import="java.util.*" errorPage="" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>论坛</title> <style type="text/css"> <!-- .style1 { color: #003399; font-size: 10pt; } .style7 { font-size: 9pt; color: #003399; } .style8 { font-size: 14px; color: #003399; } .style9 {font-size: 14pt} .style10 {font-size: 10px} .style11 {font-size: 10pt} .style12 {font-size: 11px} .style13 {font-size: 11pt} .style14 {color: #0066CC} body { background-image: url(bbsbg.gif); } body,td,th { font-size: 9pt; color: #0066CC; } --> </style> </head> <body> <p align="right"><img align="top" height="118" width="770" src="top.jpg"> <hr> <div align="right"> <%Date date=new Date(); int year=1900+date.getYear(); int month=1+date.getMonth(); int day1=date.getDate(); int day=date.getDay(); out.println("<font size=1 color=red>今天是:"+year+"年"+month+"月"+day1+"日</font>"); if(day==0){out.println("<font size=1 color=red>星期天</font>");} if(day==1){out.println("<font size=1 color=red>星期一</font>");} if(day==2){out.println("<font size=1 color=red>星期二</font>");} if(day==3){out.println("<font size=1 color=red>星期三</font>");} if(day==4){out.println("<font size=1 color=red>星期四</font>");} if(day==5){out.println("<font size=1 color=red>星期五</font>");} if(day==6){out.println("<font size=1 color=red>星期六</font>");}%> <span class="style8"><span class="style9"><span class="style10"><span class="style11"><span class="style12"><span class="style13"><span class="style10"><span class="style11"><a href="index.jsp">首 页 </a>|</span></span></span></span></span></span></span></span><span class="style1"><a href="register.jsp">新会员注册</a> | <a href="flash.jsp">产品介绍</a> | 技术论坛 | 关于本站 | 联系我们 |</span> </p> </div> <p align="left" class="style7"> &gt;&gt;分页 <a href="writebbs.jsp">发新帖</a> 精华区 <a href="search_tie.jsp">帖子查询</a> </p> <jsp:useBean id="userBean" class="firm.firm" scope="page"/> <table width="761" border="0"> <tr> <td width="99" class="style14"><span class="style1">表情</span></td> <td width="185" class="style1">主题</td> <td width="110" class="style1">作者</td> <td width="166" class="style1">发帖时间</td> <td width="107" class="style1">点击数</td> <td width="68" class="style1">回复数</td> </tr> <% String id=(String)session.getValue("id"); String sql="select * from board"; ResultSet rs=userBean.executeQuery(sql); String emote1=""; String title1=""; String username1=""; if (rs.next()) { out.println("<tr align=center>"); out.println("<td>"+rs.getString("emote1")+"</td>"); out.println("<td>"+rs.getString("title1")+"</td>"); out.println("<td>"+rs.getString("username1")+"</td>"); out.println("</tr>"); } rs.close(); %> </table> </body> </html> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 错误: Error: 500 Location: /xjt/xie/bbs.jsp Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated. E:\tomcat33\work\DEFAULT\xjt\xie\bbs_1.java:104: Class xjt.xie.ResultSet not found. ResultSet rs=userBean.executeQuery(sql); ^ Note: E:\tomcat33\work\DEFAULT\xjt\xie\bbs_1.java uses or overrides a deprecated API. Recompile with "-deprecation" for details. 1 error, 2 warnings

at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:770) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:623) at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:437) at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:961) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:866) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:824) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:152) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:438) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:505) at java.lang.Thread.run(Thread.java:534)

搜索更多相关主题的帖子: html head blank content PUBLIC 
2004-10-07 10:02
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

ResultSet rs=userBean.executeQuery(sql);

Class xjt.xie.ResultSet not found

在别人的数据库上的类,你是下载别人的网页吧?

2004-10-07 13:05
helloworld
Rank: 1
等 级:新手上路
帖 子:185
专家分:0
注 册:2004-8-27
得分:0 

你的bean,还有数据库什么的都没有,没办法调试你的错误,不过他的错误提示写得还算是挺明白的,

第一:"sun.tools.javac.Main has been deprecated", 第二:"Class xjt.xie.ResultSet not found",

第三:"E:\tomcat33\work\DEFAULT\xjt\xie\bbs_1.java uses or overrides a deprecated API"

这些估计都是你的bean的问题,自己好好看看吧!其中第二条是错误,其他的两个是警告

[此贴子已经被作者于2004-10-07 13:23:37编辑过]


2004-10-07 13:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-6120-1-1.html




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

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