You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WebPage.java 560B

1234567891011121314151617181920
  1. package sample.evolve;
  2. import java.io.*;
  3. import java.util.*;
  4. /**
  5. * Updatable class. DemoServer instantiates this class and calls
  6. * show() on the created object.
  7. */
  8. public class WebPage {
  9. public void show(OutputStreamWriter out) throws IOException {
  10. out.write("<H2>Current Time:</H2>");
  11. Calendar c = new GregorianCalendar();
  12. out.write("<CENTER><H3><FONT color=\"blue\">");
  13. out.write(c.getTime().toString());
  14. out.write("</FONT></H3></CENTER><HR>");
  15. out.write("<P><A HREF=\"demo.html\">Return to the home page.</A>");
  16. }
  17. }