我的页面在刷新15次之后 就会有一个延时等待
我想是不是由于关闭数据库问题造成的以下是大概代码连接
try
{
preparedstatement = connection.prepareStatement(s1);
preparedstatement.setInt(1,1);
resultset = preparedstatement.executeQuery();
preparedstatement.close();
}
catch(SQLException sqlexception)
{
preparedstatement.close();
DBConnect.closeConnection(connection);
}if(resultset.next())
{
do{
%>
<tr >
<td >
<a href="list2.jsp?intID=<%=resultset.getInt("intID")%></a>阿嫂地方撒旦
</td>
</tr>
<%
}while(resultset.next());
}
else
{
..........
}
resultset.close();
%>这种关闭 是不是很彻底呀
尤其是在进入<a href="list2.jsp?intID=<%=resultset.getInt("intID")%></a>
会不会关闭 连接呀
我想是不是由于关闭数据库问题造成的以下是大概代码连接
try
{
preparedstatement = connection.prepareStatement(s1);
preparedstatement.setInt(1,1);
resultset = preparedstatement.executeQuery();
preparedstatement.close();
}
catch(SQLException sqlexception)
{
preparedstatement.close();
DBConnect.closeConnection(connection);
}if(resultset.next())
{
do{
%>
<tr >
<td >
<a href="list2.jsp?intID=<%=resultset.getInt("intID")%></a>阿嫂地方撒旦
</td>
</tr>
<%
}while(resultset.next());
}
else
{
..........
}
resultset.close();
%>这种关闭 是不是很彻底呀
尤其是在进入<a href="list2.jsp?intID=<%=resultset.getInt("intID")%></a>
会不会关闭 连接呀
解决方案 »
- 求一个JSP提交数据页面
- 重命名文件名。
- Struts2 <param name=""/> 传值
- 搜索排序最上面,急急急
- Borland JBuilder 2005 企业版应如何安装
- void fun(HttpServletRequest request,HttpServletResponse response)调用时怎么使用参数?
- 关于Java Applet与HTML交互的问题
- eclipse安装问题?
- 怎样用java 语言判断一个字符变量是否为数字
- 同一个tomcat,myeclise调用它运行项目可以,但单独用tomcat运行项目不行
- tomcat5+mysql数据库配置问题.头痛死了.
- apache+tomcat访问其它目录jsp工程
resultset.close();
preparedstatement.close();
DBConnect.closeConnection(connection);
//
明白错误在哪里了
再问如果是
....
response.sendRedirect("XXX.jsp");
.......
.....
resultset.close();
preparedstatement.close();
DBConnect.closeConnection(connection); 会能关闭数据库连接么?