I have Web application. I use Struts2. And I have little JSP:
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<body>
<s:form action="updateForm">
<s:text name="news.page.main.label"/>
<s:iterator status="stat" value="news">
<table>
<tr>
<td><s:property value="title"/></td>
<td><s:property value="body"/></td>
</tr>
</table>
</s:iterator>
</s:form>
</body>
</html>
This page has table with news. For example I have 2 users that open this page and at some time one of them add new row. and I want page of second user update this page for example every 5 minutes.
How can I do this with the help struts2 or JS?
Please give some code for example.
If you are free to use any ajax frameworks, I would say try Direct Web Remoting and use reverse AJAX.