File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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