O'Reilly logo

Java™ After Hours: 10 Projects You'll Never Do at Work by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing New Comments

If the t parameter is not set to “1”, chat.html may be trying to tell you that the user is sending you new comments. The text field you see in Figure 5.1 is named text1, and the text area is named textarea1. If there is already text in those two controls, you should store the user's new comments from the text area in the text0 through text7 strings. You can start by recovering all the current user comments:

 <% } else{ if(request.getParameter("textarea1") != null){ String name = request.getParameter("text1"); String text0 = (String) application.getAttribute("text0"); String text1 = (String) application.getAttribute("text1"); String text2 = (String) application.getAttribute("text2"); String text3 = (String) application.getAttribute("text3"); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required