Wells said:
Hello all,
I wonder if there is a way to do this, any help would be appreciated.
The problem of course is how to
force the JSP to refresh directly from the server?
Is that possible?
I appreciate any help.
Wells...
Peace be unto you.
My sources may be dated.
And this is very much
heresay on my part.
But you said "any" help.
There is something called server push
and client pull.
Using Netscape Server Push Technology with ASP
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q250983
Apparently, Internet Explorer (5 <=) does not support
the encapsulation of multiple entities in a response.
http://www.ietf.org/rfc/rfc2068.txt
which is crucial to server push.
http://c2.com/cgi/wiki?MicrosoftInternetExplorer
Microsoft Internet Explorer does support many client pull
technologies.
About Active Channel Features
http://msdn.microsoft.com/library/d...op/delivery/channel/tutorials/development.asp
HOW TO: Enable Client Pull for Web Servers, Sites, and Folders
http://support.microsoft.com/default.aspx?scid=kb;EN-US;240774
"
- Periodically force an Internet browser to reload a page
automatically. Typically, this occurs on a page-by-page basis for a
Web site using HTML.
- Prevent browsers from viewing data that may be out of date,
especially on sites where information is updated frequently. Client
pull is implemented through the HTTP header REFRESH and can be used to
redirect to another page.
"
Using META DATA to refresh pages
http://support.microsoft.com/default.aspx?scid=kb;EN-US;196471
You can also use Javascript
to make a query every now and again,
using setTimeout function.
like
window.setTimeout("getBlog()", 1000);
Where the function javascript getBlog is called
after 1 second or something like that.
Using dhtml makes the whole process seem
seemless.
setTimeout Method
http://msdn.microsoft.com/library/d...author/dhtml/reference/methods/setTimeout.asp
An example of a javascript that pulls
James Gosling's blog
<html>
<head>
<title>James Gosling speaks</title>
<style>
.blog
{
float:left;
width:40%;
padding:1em;
margin:8px;
background-color:whitesmoke;
}
</style>
<script>
function getBlog(site)
{
var XMLHTTP = new ActiveXObject( 'Msxml2.XMLHTTP' );
XMLHTTP.Open("GET", site, false);
XMLHTTP.Send(null);
//window.alert(XMLHTTP.responseText);
var xmlDoc;
var root;
var returnString="<div class=\"blog\">";
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(XMLHTTP.responseText);
root = xmlDoc.documentElement;
var titleNodelist = xmlDoc.getElementsByTagName("title");
var linkNodelist = xmlDoc.getElementsByTagName("link");
var descNodelist = xmlDoc.getElementsByTagName("description");
returnString+="<b>"+titleNodelist.item(0).firstChild.nodeValue+"</b><br>";
for( i = 1; i < titleNodelist.length; i++)
{
returnString+="<a href=\""
+linkNodelist.item(i).firstChild.nodeValue
+"\">"+titleNodelist.item(i).firstChild.nodeValue
+"</a><br>";
}
returnString+="</div>";
return returnString;
}
</script>
</head>
<body>
<script>
document.write(getBlog("
http://today.java.net/jag/blog.rss"));
</script>
</body>
</html>
Have a good night.