This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Page Refresh Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Page Refresh Problem" Watch "Page Refresh Problem" New topic
Author

Page Refresh Problem

Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
i am trying out a WML,Servlet based Chat that retrieves the Message from the DB for a specified time delay, i use Nokia Toolkit 2.0 to test it.

The problem is the refresh happens only once and then the page is not updated.. anybody can pls suggest how to get rid of the problem.

code
------------------------------------------------------------------------
out.println("<head>");
out.println("<meta forua=\"true\" http-equiv=\"Cache-Control\" content=\"max-age=0\"/></head>");
out.println("<card id=\"msg\" title=\"" + username + ":Msg's\" ontimer=\"" + url + "\" newcontext=\"true\">");
------------------------------------------------------------------------

Roshini.S
Bonagiri UmaMaheshwar Rao
Greenhorn

Joined: Mar 27, 2005
Posts: 12
instead of setting the headers using out.println() method set the header using response object.
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page Refresh Problem