[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

refresh a page

Posted on 2004-04-30
7
Medium Priority
?
1,405 Views
Last Modified: 2010-04-01

Hello All

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

0
Comment
Question by:VolSpeak
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part III
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 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