在关闭连接的时候一直出错, 请大侠指点。
org.apache.jasper.JasperException: An exception occurred processing JSP page /news/login.jsp at line 2623:           out.print("用户名或密码错误!");
24:      }catch(Exception ce){System.out.print(ce.toString());}
25:   finally{
26:          con.close();
27:          pst.close();
28:          rst.close();
29:          }原代码如下:<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*"%>
<%
  String username,userpwd;
  username=request.getParameter("username");
  userpwd=request.getParameter("userpwd");
  Connection con=null;
  PreparedStatement pst=null;
  ResultSet rst=null;
  try{
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    con=DriverManager.getConnection("jdbc:sqlserver://localhost;database=News","yjw757174266","yejianwen");
    pst=con.prepareStatement("select * from usertabel where username=? and userpwd=?");
    pst.setString(1,username);
    pst.setString(2,userpwd);
    rst=pst.executeQuery();
    if(rst.next()){
       session.setAttribute("username",username);
       session.setAttribute("loged","true");
       response.sendRedirect("main.jsp");
                    }
     else
          out.print("用户名或密码错误!");
     }catch(Exception ce){System.out.print(ce.toString());}
  finally{
         con.close();
         pst.close();
         rst.close();
         }
%>
感激不尽。