next up previous contents
Next: Exercise 4: Sending a Up: Lab 2: Guest book Previous: Exercise 2: Guest book

Exercise 3: Generating a guest book page

Now users can add themselves to the guest book, but there is no way for anyone, even yourself, to see the list of guests.

In this exercise, you should change the threaded server so that every time a user submits new information, you generate an HTML page that contains a list of all registered users. Web pages and E-mail addresses should be clickable hyper links (e-mail addresses have ``mailto:'' URLs; for example, mailto:jonkv@ida.liu.se).

Note that since users may enter characters that are used by HTML, such as ``<'' and ``&'', you may want to convert them to their corresponding character names, such as ``&lt;'' and ``&amp;''. Otherwise, users can ``sabotage'' your guest book page by entering HTML codes in one of the text fields.

You should also change the applet so that when the user clicks the ``View guest book'' button, the browser will display the guest book; see the java.applet.Applet and java.applet.AppletContext classes for instructions on how to make the browser show another web page.


next up previous contents
Next: Exercise 4: Sending a Up: Lab 2: Guest book Previous: Exercise 2: Guest book
Jonas Kvarnstrom
2/5/1998