一个相当困惑的小问题

jangill 2006-12-21 11:54:08
代码如下:
<%@ page contentType="text/html;charset=gb2312" import="com.com.ado.DBConnect,java.sql.*"%>
<%@ page errorPage="error.jsp"%>
<%@ page import="java.util.*, com.com.struts.action.UserInfo"%>

<html>
<head>
<title>更多用户</title></head>
<body>


<TABLE align=center bgColor=#e0e0e0 border=0>
<TR bgColor=#c2c2c2><TH width="250">网站名称<TH>网站介绍<TH width="200">注册时间</TR>

<%
try
{
ArrayList userlists = (ArrayList)request.getAttribute("userlists");
Iterator it = userlists.iterator();
if (userlists != null)
{
while(it.hasNext())
{
String G_webname=((UserInfo)it.next()).getG_webname();
String G_weburl=((UserInfo)it.next()).getG_weburl();
String G_webinfo=((UserInfo)it.next()).getG_webinfo();
String G_logindate=((UserInfo)it.next()).getG_logindate();

%>
<TR><TD><a href=<%=G_weburl%>><%=G_webname%></a><TD><%=G_webinfo%><TD><%=G_logindate%></TR>
<%
}//while end
}//if end
}
catch(Exception e)
{
e.printStackTrace();
}
%>
</TABLE>
</body>
</html>
编译时,总是出现错误提示:"try without "catch" or "finally"...jsp..."
请大家帮帮看, 是怎么回事?
我去掉了try块后, 还是报那个错误.
...全文
147 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
superzhang11 2006-12-21
  • 打赏
  • 举报
回复
有点怪
捏造的信仰 2006-12-21
  • 打赏
  • 举报
回复
考眼力的时候到了。楼主看看哪个“{”没有相应的“}”匹配。

62,615

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧