This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes function of refresh button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "function of refresh button" Watch "function of refresh button" New topic

function of refresh button

lily ling

Joined: Dec 03, 2001
Posts: 25
Hi, I found that, on this page, if I pressed refresh button, my displayed name ( which is lily ling ) is still there. However, I used Apache/Tomcat/Cocoon to generate my page and input some data to do query. During the waiting time, if I pressed refresh button, I found my query critria has gone.
May I ask how to keep the data I input there if I press refresh button ?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I think it depends on timing.

If you fill out a form, and click submit... and during the time that you are waiting for a response, you click refresh, you will probably get the original form page, which of course, since you refreshed it.. contains no data.

If on the other hand, you are talking about the results page ie: the processing is done, and you've got the results page, and clicked refresh.. and the browser should ask you "this page was made with posted data, do you want to repost?"
lily ling

Joined: Dec 03, 2001
Posts: 25
Thank you very much, Mike Curwen.
May I ask another question: I noticed there are following message in Apache's raven_ssl_log file:
Connection to child 1 closed with unclean shutdown <servername, client IP address >
May I ask what this line means? Do it mean that client pressed refresh button so that the process which uses above connection has been ended with some problem ?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: function of refresh button
Similar Threads
HTML Frames / Applet / Servlet and Session Tracking - Help with Strategy Please
why no output from this code ?
Javascript Back button
how to invalidate session when browser refreshed or backward pressed
Extremely Urgent , Please help : too many httpsd process