File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "Page Refresh Problem" Watch "Page Refresh Problem" New topic

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.

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\">");

Bonagiri UmaMaheshwar Rao

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:
subject: Page Refresh Problem
It's not a secret anymore!