anchor.diff:  							if (rs4 != null)
   								rs4.close();
   						}
  -						conn.setAutoCommit(true);
  -						conn.close();
  +						
  +						finally
  +						{
  +							conn.setAutoCommit(true);
  +							if (conn != null)
  +								conn.close();
  +							if (pstmt1 != null)
  +								pstmt1.close();
  +							if (pstmt2 != null)
  +								pstmt2.close();
  +							if (pstmt3 != null)
  +								pstmt3.close();
  +							if (pstmt4 != null)
  +								pstmt4.close();
  +							if (rs1 != null)
  +								rs1.close();
  +							if (rs2 != null)
  +								rs2.close();
  +							if (rs4 != null)
  +								rs4.close();
  +							
  +						}
   					}
   				
   					//Display cart contents
  
positive.code: 						"qwovydljafffgl", "cGdGZam7xcem_isgwfV3FQ_jxs");
  					
  				}
  				catch (Exception e)
  				{
  					e.printStackTrace();
  					if (conn != null)
  
negative.code: 						rs2.close();
  					if (rs4 != null)
  						rs4.close();
  					response.sendRedirect("productorder.jsp?error=yes");
  				}
  				
  				//Insert data if specified, and redirect back to products.jsp
  				if (action.equals("insert"))
  				{
  						try
  						{
  							//Add to carts_products
  							quantity = Integer.parseInt(request.getParameter("quantity"));
  							conn.setAutoCommit(false);
  