anchor.diff:      if (username == null)
           username = "";
   
  -    Connection ConnRecordset1 = DriverManager.getConnection(MM_jjdb_STRING, MM_jjdb_USERNAME, MM_jjdb_PASSWORD);
  -    Statement stmt = ConnRecordset1.createStatement();
  -    Statement stmt2 = ConnRecordset1.createStatement();
  -    Statement stmt3 = ConnRecordset1.createStatement();
  -    String commandText = "SELECT user.id, user.type, user.name, user_bio.content As bio, user_contact.email, user_contact.icq, user_contact.aim, user_contact.yahoo, user_contact.msn, user_contact.hp_uri, user_contact.hp_title, user_contact.phone, user_location.city, user_location.state, user_location.country, user_location.zip FROM user, user_bio, user_contact, user_location WHERE user.username=\"" + username + "\" AND user_bio.id = user.id  AND user_contact.id = user.id AND user_location.id = user.id LIMIT 1;";
  -    String commandText2 = "select friends.friendid as fif, (SELECT user.username from user WHERE user.id=fif) FROM friends, user WHERE user.username=\"" + username + "\" AND user.id=friends.id;";
  -    String commandText3 = "select friends.id as fif, (SELECT user.username from user WHERE user.id=fif) FROM friends, user WHERE user.username=\"" + username + "\" AND user.id=friends.friendid;";
  -    ResultSet Recordset1 = stmt.executeQuery(commandText);
  -    ResultSet Recordset2 = stmt2.executeQuery(commandText2);
  -    ResultSet Recordset3 = stmt3.executeQuery(commandText3);
  +    if (!StringUtil.lengthCheck(username, 3, 15)) {
  +        PrintWriter out2 = response.getWriter();
  +        WebError.Display("Input Error",
  +                        "username must be 3-15 characters.",
  +                        out2);
  +        return;
  +    }
  +
  +    Connection ConnRecordset1;
  +    Statement stmt;
  +    Statement stmt2;
  +    Statement stmt3;
  +    ResultSet Recordset1;
  +    ResultSet Recordset2;
  +    ResultSet Recordset3;
  +
  +    try {
  +        ConnRecordset1 = DriverManager.getConnection(MM_jjdb_STRING, MM_jjdb_USERNAME, MM_jjdb_PASSWORD);
  +        stmt = ConnRecordset1.createStatement();
  +        stmt2 = ConnRecordset1.createStatement();
  +        stmt3 = ConnRecordset1.createStatement();
  +        String commandText = "SELECT user.id, user.type, user.name, user_bio.content As bio, user_contact.email, user_contact.icq, user_contact.aim, user_contact.yahoo, user_contact.msn, user_contact.hp_uri, user_contact.hp_title, user_contact.phone, user_location.city, user_location.state, user_location.country, user_location.zip FROM user, user_bio, user_contact, user_location WHERE user.username=\"" + username + "\" AND user_bio.id = user.id  AND user_contact.id = user.id AND user_location.id = user.id LIMIT 1;";
  +        String commandText2 = "SELECT friends.friendid as fif, (SELECT user.username from user WHERE user.id=fif) FROM friends, user WHERE user.username=\"" + username + "\" AND user.id=friends.id;";
  +        String commandText3 = "SELECT friends.id as fif, (SELECT user.username from user WHERE user.id=fif) FROM friends, user WHERE user.username=\"" + username + "\" AND user.id=friends.friendid;";
  +        Recordset1 = stmt.executeQuery(commandText);
  +        Recordset2 = stmt2.executeQuery(commandText2);
  +        Recordset3 = stmt3.executeQuery(commandText3);
  +    } catch (java.sql.SQLException sqlex) {
  +        PrintWriter out2 = response.getWriter();
  +        WebError.Display("Error",
  +                        "Unable to retrieve profile.",
  +                        out2);
  +        return;
  +    }
   
   %>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  
positive.code: </body>
  </html>
  <%
      Recordset1.close();
      stmt.close();
      Recordset2.close();
      stmt2.close();
      Recordset3.close();
      stmt3.close();
      ConnRecordset1.close();
  %>
negative.code: <%@ page import="java.sql.DriverManager" %>
  <%@ page import="java.sql.ResultSet" %>
  <%@ page import="java.sql.Statement" %>
  <%@ page import="com.justjournal.utility.StringUtil"%>
  <%@ page import="com.justjournal.WebError"%>
  <%@ page import="java.io.PrintWriter"%>
  <%@ page import="com.justjournal.User"%>
  <%@ include file="Connections/jjdb.jsp" %>
  <%
      response.setContentType("text/html");
  