Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
7.3 Persistent Servlet State and Auto Reloading Pages
157
Listing 7.1 PrimeNumbers.java (continued)
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Some " + numDigits + " Digit Prime Numbers";
out.println(ServletUtilities.headWithTitle(title) +
"\n" +
"" + title + "
\n" +
"Primes found with " + numDigits +
" or more digits: " + numCurrentPrimes +
".");
if (isLastResult)
out.println("Done searching.");
else
out.println("Still looking for " + numPrimesRemaining +
" more");
out.println("");
for(int i=0; i
out.println(" " + currentPrimes.elementAt(i));
}
out.println("");
out.println("