wood burning stoves 2.0*
The moose likes JSP and the fly likes Auto-updating JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Auto-updating JSP page" Watch "Auto-updating JSP page" New topic
Author

Auto-updating JSP page

Jason Brawner
Ranch Hand

Joined: Dec 19, 2001
Posts: 66
I was wondering how to create a JSP that only refreshes portions of the page, without frames. Here is an example...
At nfl.com they have an area called Game Center. It allows you to watch a games stats (almost) live but the whole page doesn't refresh, just the portions that change like player stats and a graphical scoreboard. How do they do that?
There are no frames or applets. I've looked at the source and its a bunch of JavaScript.
Any ideas?


Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
sanj singh
Ranch Hand

Joined: Jun 30, 2001
Posts: 129
Hi Jason
This is what I will do.......
Suppose A.jsp is the main page and in there you want to call B.jsp.
A.jsp
------
<jsp:include page="B.jsp" />
B.jsp
-----
<%
response.setHeader("Refresh","5");
%>
This will force B.jsp to refresh every 5 seconds
Hope this helps
Regards
sanj
Jason Brawner
Ranch Hand

Joined: Dec 19, 2001
Posts: 66
They do use a refresh header that updates the entire page every couple minutes BUT updates occur to the page on a play-by-play basis as well without updating the whole page.
[ February 08, 2002: Message edited by: Jason Brawner ]
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 565
I was intrigued so I checked out the page. I found:


I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto-updating JSP page
 
Similar Threads
session time out problem. with frames?
Frame Refresh code in HTML or Java Script
Return object from servlet to jsp
How to update the browser address with the displayed page
HTML Frames and JSP!