}
if (password.length() > 20) {
errors.put("password", "Password cannot be longer than 20 characters");
return errors;
}
return errors;
}
private Hashtable validateUsername(String username, Hashtable errors) {
if (username == null || username.equals("")) {
errors.put("username", "Username cannot be empty");
return errors;
}
if (username.length() > 20) {
errors.put("username", "Username cannot be longer than 20 characters");
return errors;
}
return errors;
}
}
B.3 Java Bean orders
package penguins.access.db2;
import java.util.*;
public class Orders {
private Vector orderIDs=new Vector();
private Hashtable timestamps=new Hashtable();
private Hashtable productIDs=new Hashtable();
public Orders() {
super();
}
public void add(String order_id, String order_timestamp, String product_id) {
orderIDs.addElement(order_id);
timestamps.put(order_id, order_timestamp);
productIDs.put(order_id, product_id);
}
public Enumeration orderIDs() {
return orderIDs.elements();
}
public String productID(String orderID) {
return (String) productIDs.get(orderID);
}
public String timestamp(String orderID) {
return (String) timestamps.get(orderID);
}
}
158
Linux Web Hosting with WebSphere, DB2, and Domino




  

Home

About Services Network Support FAQ Order Contact
 

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved