Solved

refresh a page

Posted on 2004-04-30
7
1,398 Views
Last Modified: 2010-04-01

Hello All

How can I invoke a .jsp page to refresh/reload?

0
Comment
Question by:VolSpeak
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:indigostark
ID: 10959247
<META HTTP-EQUIV="refresh" CONTENT="5">

this will refresh the page every 5 seconds
0
 

Author Comment

by:VolSpeak
ID: 10959438

I just want it to refresh once, when the user loads it
0
 
LVL 35

Expert Comment

by:TimYates
ID: 10959826
<%
        // Set to expire far in the past.
        response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");

        // Set standard HTTP/1.1 no-cache headers.
        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");

        // Set IE extended HTTP/1.1 no-cache headers (use addHeader).
        response.addHeader("Cache-Control", "post-check=0, pre-check=0");

        // Set standard HTTP/1.0 no-cache header.
        response.setHeader("Pragma", "no-cache");
%>

At the top of the jsp should (might) stop the user from caching it, so they will see the new copy every time...

Some versions of IE don't care at all, and some proxy servers will ignore these settings, thus screwing you up...

Then, you need to try putting dummy random into the URL line...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:VolSpeak
ID: 10959842

>>Then, you need to try putting dummy random into the URL line...

Im confused as to what you mean here

0
 
LVL 35

Accepted Solution

by:
TimYates earned 50 total points
ID: 10960028
When you link to the URL for the page, make the url something like:

String url = "whatever.jsp?time=" + System.currentTimeMillis() ;

So that the URL is different every time, thereby fooling rubbish proxy servers :-)
0
 

Author Comment

by:VolSpeak
ID: 10960375
<%
        // Set to expire far in the past.
        response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");

        // Set standard HTTP/1.1 no-cache headers.
        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");

        // Set IE extended HTTP/1.1 no-cache headers (use addHeader).
        response.addHeader("Cache-Control", "post-check=0, pre-check=0");

        // Set standard HTTP/1.0 no-cache header.
        response.setHeader("Pragma", "no-cache");
%>

So I just put this in my index.jsp and everytime index.jsp is visited it will be refreshed. Im using mozilla with apache tomcat.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 10962616
should be :)

Good luck :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now