[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

auto refresh

Posted on 2004-05-01
5
Medium Priority
?
454 Views
Last Modified: 2010-04-01
I have a server client type system running and i need a way to automatically refresh a jsp page so that new orders from clients will appear on the server page.  Is this possible with jsp?
Thanks
Margin_Walker
0
Comment
Question by:Margin_Walker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 10970656
Try add meta tag like:

<META HTTP-EQUIV="REFRESH" Content="20">

where the page will auto-refresh on every 20 seconds.

cheers

0
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 200 total points
ID: 10970662
also try add this at the top of your JSP pages, to remove the page cache if necessary:

<%
      if (request.getProtocol().compareTo("HTTP/1.0") == 0)
      {
            response.setHeader("Pragma", "no-cache");
      }
      else if (request.getProtocol().compareTo("HTTP/1.1") == 0)
      {
            response.setHeader("Cache-Control", "no-cache");
      }
      
      response.setDateHeader("Expires", 0);
%>

regards
0
 

Author Comment

by:Margin_Walker
ID: 10998754
Thats brilliant it works perfectly. Thanks.  But can you just explain to me what the if else block of code is doing.
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 11002491
The code above remove the page cache, so that each time you load this page, it will get the content from server, instead of from cache.

Hope this is clear. cheers
0
 

Author Comment

by:Margin_Walker
ID: 11006510
Thats great thanks.
Margin_Walker
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question