请大家支个招!下面这些语句好像在运行的时候有问题,但没有任何语法错误,请大家帮忙看看

garth1982 2006-07-10 11:36:37
JspWriter out = pageContext.getOut();
HttpSession session = pageContext.getSession();
try
{

String strSql=(String)session.getAttribute(Constants.SQLSTMT_KEY);
Vector addressBookBeans=AddressBookBean.search(strSql);

out.println("<table border=\"2\" cellspacing=\"0\" cellpadding=\"0\">");
out.println("<tr>");
out.println("<th BGCOLOR=\"#00FF00\"><b>Name</b></th>");
out.println("<th BGCOLOR=\"#00FF00\"><b>Phone<b></th>");
out.println("<th BGCOLOR=\"#00FF00\"><b>Address</b></th>");
out.println("</tr>");

for(int i=0;i<addressBookBeans.size();i++)
{
AddressBookBean bean=(AddressBookBean)addressBookBeans.elementAt(i);
out.println("<tr>");
out.println("<td>"+ bean.getName() + "</td>");
out.println("<td>" +bean.getPhone() + "</td>");
out.println("<td>"+bean.getAddress()+"</td>");
}

out.println("</table>");


}catch (Exception ex)
{
throw new JspTagException("IOException:" + ex.toString());
}
return super.doEndTag();
}
...全文
39 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
loveyt 2006-07-10
  • 打赏
  • 举报
回复
看样子像是标签。
只要是有问题,一般来说会抛出异常,还是把异常贴来看看。可能在你的后台里面。

另外,out用完记得flush一下,一定要close()

81,092

社区成员

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

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