title="P4JSP Users";

Users:

class UserComparator implements Comparator { public int compare(Object o1, Object o2) { return ((User)o1).getId().compareTo(((User)o2).getId()); } public boolean equals(Object o) { return this.equals(o); } } TreeSet ts = new TreeSet(new UserComparator()); Enumeration en = User.getUsers(env); while (en.hasMoreElements()) { ts.add(en.nextElement()); } Iterator itr = ts.iterator(); while (itr.hasNext()) { User usr = (User)itr.next(); out.print("<TR>"); out.print("<TD>"+usr.getId()+"</TD>"); out.print("<TD>"+usr.getFullName()+"</TD>"); out.print("<TD><A href=\"mailto:"+usr.getEmail()+"\">"+usr.getEmail()+"</A></TD>"); out.print("</TR>"); }
User IdFull NameEmail