Friday, February 6, 2004 08:20 AM
I would do this by having the action on the form page call a servlet, this servlet would maintain a file that contained the text from the form, ie write the latest entry from the form to the file.
Then you read all the data from the file into a variable set it in the session or pass it in the query string and redirect the servlet to the jsp page that displays the results.
This way you keep the entered data between server restarts
Another way (may work I havent tried it) of doing this that would not keep the info between server restarts would be to use a bean that had its scope set to application. Your form page would call the display page which then took the value, used a set method of the bean to add to the existing message, a get method to get the total message and then display it. I think with the bean being at application scope all users would see the same message?? I could well be talking rubbish, Ill try it if I have time and post the results here.
Hope this helps
ps If you struggle writing the code Ill post some but try and figure it out first :)