• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

Refreshing the page every 10 mins

Here is my problem:

I need a page to refresh every 10 mins (or any given interval) and when it times out (time must be kept on the server not the client) I need it to switch between 2 different includes.

Anyone want to tackle this?

thanks.
0
zerium
Asked:
zerium
  • 5
  • 3
  • 2
  • +2
1 Solution
 
cheekycjCommented:
to refresh a page every 10 minutes.. use this:

<META HTTP-EQUIV="refresh" content="600;URL=http://www.yoursite.com/yourpage.jsp">

about the second part, I am not sure.

Every 10 mins you want to switch include files or every timeout you need to change something.

CJ
0
 
zeriumAuthor Commented:
I'd like to do this server side (the keeping track of time) I dont want the user to refresh their browser every 10 mins. I'd like to do this through JSP.
0
 
cheekycjCommented:
but you can't make the user's browser reload from the server side.  To make the page loaded refresh, the browser itself has to initiate the request.

CJ
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
objectsCommented:
> I'd like to do this through JSP.

HTTP is a request-response protocol. The browser sends a request to the server, which returns a response (typically html). It does not support the server sending requests to the browser.
0
 
syd108Commented:
The easiest way to do this is to put an invisible applet in the jsp and do that switching code server side by passing url paramaters back to the server.

regards
syd
0
 
syd108Commented:
Some more useful links:
http://forum.java.sun.com/thread.jsp?thread=318194&forum=33&message=1292630

You can also take a look at the java.util.Timer and java.util.TimerTask

syd
0
 
zeriumAuthor Commented:
I think we have solved this here at work. We are going to create a bean that when its loaded in memory it captures the time and then every 10 mins or so it switches two includes.

I'm sorry if I never made it clear that we aren't concerned about the user getting the new page. We don't want to force them to refresh every 10 mins. The new page will be there but, they will only see it if they hit the page again.
0
 
cheekycjCommented:
ah ok.

Would you like to have this question PAQd and your pts refunded?

CJ
0
 
zeriumAuthor Commented:
yeah CJ thanks for help everyone... sorry if it was a hassle...
0
 
cheekycjCommented:
Ask a 0 point question here:
http://www.experts-exchange.com/Community_Support/

Ask for this question to be PAQd.

CJ
0
 
cheekycjCommented:
I think this should be PAQd rather than deleted.

CJ
0
 
LunchyCommented:
Question points reduced (100) and question PAQ'd
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now