anchor.diff:  <%@ 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");
  
positive.code:     <% if (Recordset1.next()) { %>
      <h2>Profile for <%=username%></h2>
  
      <h3>General Information</h3>
  
      <p>user: <a href="users/<%=username%>"><%=username%></a> (<%=Recordset1.getString("id")%>)
  
negative.code:     if (username == null)
          username = "";
  
      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"
  