FileDocCategorySizeDatePackage
FiveIntsServlet.javaAPI DocExample875Tue Mar 13 15:32:40 GMT 2001None

FiveIntsServlet

public class FiveIntsServlet extends Object

Fields Summary
Constructors Summary
Methods Summary
public voidservice(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)

		PrintWriter out = resp.getWriter();
		out.println("<HTML>");
		out.println("<HEAD>");
		out.println("<TITLE>Your Personal Random Numbers</TITLE>");
		out.println("<H1>Your Personal Random Numbers</H1>");
		out.println("<P>Here are your personal random numbers,");
		out.println("carefully selected by a");
		out.println("<A HREF=\"http://java.sun.com\">Java</A> program.");
		out.println("<OL>");
		Random r = new Random();
		for (int i=0; i<5; i++) {
			out.print("<LI>");
			out.println(r.nextInt());
		}
		out.println("</OL>");
		out.println("<HR></HR>");
		out.println("<A HREF=\"index.html\">Back to main Page</A>");