Hi,
I am writing a demo chat application.
I am unable to refresh my application when a new message is posted.
How do we do this in
jsp? I mean how do we refresh/reload the jsp page?
In
servlets, there is response.setHeader for refreshing, are we supposed to
use the same.
Also, I went thru some other code. The author has used
java script for doing this. I have pasted it below. I am now able to get that.
------------------javascript code-----------------------------
<!--
function reload()
{
window.location.reload();
}
setInterval('reload()', <%=refreshAfter%>
;
function winopen(path)
{
chatterinfo = window.open(path,"chatterwin","scrollbars=no,resizable=yes, width=400, height=300, location=no, toolbar=no, status=no");
chatterinfo.focus();
}
//-->