title="P4JSP Clients";

Clients:

class ClientComparator implements Comparator { public int compare(Object o1, Object o2) { return ((Client)o1).getName().compareTo(((Client)o2).getName()); } public boolean equals(Object o) { return this.equals(o); } } TreeSet ts = new TreeSet(new ClientComparator()); Enumeration en = Client.getClients(env); while (en.hasMoreElements()) { ts.add(en.nextElement()); } Iterator itr = ts.iterator(); while (itr.hasNext()) { Client clnt = (Client)itr.next(); out.print("<TR>"); out.print("<TD>"+clnt.getName()+"</TD>"); out.print("<TD>"+clnt.getDescription()+"</TD>"); out.print("</TR>"); }
ClientDescription