Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
82
Chapter 3 Handling the Client Request: Form Data
Listing 3.6 SubmitResume.java (continued)
// Given "Java,C++,Lisp", "Java C++ Lisp" or
// "Java, C++, Lisp", returns
// "
// Java
// C++
// Lisp
// "
private String makeList(String listItems) {
StringTokenizer tokenizer =
new StringTokenizer(listItems, ", ");
String list = "
while(tokenizer.hasMoreTokens()) {
list = list + " " + tokenizer.nextToken() + "\n";
}
list = list + "";
return(list);
}
// Show a confirmation page when they press the
// "Submit" button.
private void showConfirmation(HttpServletRequest request,
PrintWriter out) {
String title = "Submission Confirmed.";
out.println(ServletUtilities.headWithTitle(title) +
"\n" +
"" + title + "
\n" +
"Your resume should appear on line within\n" +
"24 hours. If it doesn't, try submitting\n" +
"again with a different email address.\n" +
"