| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 607 人关注过本帖
标题:[求助]哪里错了?
取消只看楼主 加入收藏
kingyor
Rank: 1
等 级:新手上路
帖 子:66
专家分:0
注 册:2006-6-4
收藏
 问题点数:0 回复次数:0 
[求助]哪里错了?

代码:

<%@ page contentType="text/html; charset=gbk" language="java" import="java.sql.*,bbs.Bbs" errorPage="" %>
<%@ page import="java.sql.*,java.util.*"%>
<%request.setCharacterEncoding("gbk");%>
<%
java.util.Date now=new java.util.Date();
java.sql.Date nowtime=new java.sql.Date(now.getTime());
String ThisTime=(String)nowtime.toString();
%>
<HTML><HEAD><TITLE>测试论坛</TITLE></head>
<body>

<div>
<marquee width="90%" height="12" direction="left" align=right scrollamount=4>
<img src="image/star_level1.gif" width="16" height="16">
<%
Bbs bbs=new Bbs();
String Image="images/newpokp.gif";
ResultSet rs=null;
ResultSet rt=null;
String sql;
sql="select * from affiche order by id desc";
String Notice="";
rs=bbs.query(sql);
while (rs.next())
{
String Time=rs.getString("outtime");
Notice=rs.getString("title")+":<font color=black>"+rs.getString("content")+"</font><font color=gray>&nbsp;"+Time+"</font>&nbsp;&nbsp;&nbsp;"+Notice;
}
out.print(Notice);
rs.close();
%>
</marquee></div>
<div>
<% sql="select * from type order by tid";
String K_Id=null, F_Title=null;
rs=bbs.query(sql);
while(rs.next())
{
K_Id=rs.getString("tid");
F_Title=rs.getString("tname");
%>
<div><%=F_Title%>dgfrdfhg </div>
<% sql="SELECT * FROM kind where tid='"+K_Id+"'";
rt=bbs.query(sql);
while (rt.next())
{
String Time_Str=rt.getString("lasttime");
if((Time_Str.substring(0,10)).equals(ThisTime))
{
Image="images/newpokp1.gif";
}
String Man_Str=rt.getString("lastwriter");
String Forum_id=rt.getString("kid");
String Forum_Mastor=rt.getString("admin");

if (Man_Str==null)
Man_Str="无";
else
Man_Str="<a href='member.jsp?member="+Man_Str+"'>"+Man_Str+"</a>";


if ((Forum_Mastor==null)||(Forum_Mastor.equals("")))
Forum_Mastor="招骋中...";
else
Forum_Mastor="<a href=member.jsp?member="+Forum_Mastor+">"+Forum_Mastor+"</a>";
%><div><img src="image/<%=Image%>" width="25" height="25"></div>
<div><span><a href="board.jsp?fid=<%=Forum_id%>"><%=rt.getString("kname")%></a></span>
<span><%=rt.getString("content")%></span>
<span><%=rt.getString("num")%></span>
<span><%=rt.getString("notenum")%></span>
<span><%=Time_Str%></span>
<span><%=Man_Str%></span>
<span><%=Forum_Mastor%></span>
<span></span><div><%
Image="images/newpokp.gif";
}
rt.close();
}
rs.close();
%>
</div>
</body>
</html>

我改了一天了,改来改去,精简又精简,测试又测试,可还是出现too many servlet includes `/bbs/'错误,实在是让人疯狂啊!

搜索更多相关主题的帖子: java util Date sql 
2007-07-07 22:22
快速回复:[求助]哪里错了?
数据加载中...
 
   



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

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