You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Giovanni Azua <gi...@imc.nl> on 2007/10/17 09:14:38 UTC

realtime updatable list ..

hi all,

I have at "application scope level" a list of data received as event 
from a system outside the Struts 2 web app. I then have my struts 
application with a JSP page that shows to the user the list using 
displaytag when the user chooses to have an overview of such list.

The question is:

- Is there any pattern in Struts 2 to have the application 
ContextListener pushing the newest data to every Session that has such 
JSP open? i.e. an event of my system publishes data and this is received 
by my Webapp-specific ContextListener then from there I would like to 
push such information to all sessions that have the relevant JSP open 
... using AJAX?
- Otherwise would be possible having an action with continue refreshing 
using plain HTML?

TIA,
regards,
Giovanni

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: realtime updatable list ..

Posted by Laurie Harper <la...@holoweb.net>.
Giovanni Azua wrote:
> hi all,
> 
> I have at "application scope level" a list of data received as event 
> from a system outside the Struts 2 web app. I then have my struts 
> application with a JSP page that shows to the user the list using 
> displaytag when the user chooses to have an overview of such list.
> 
> The question is:
> 
> - Is there any pattern in Struts 2 to have the application 
> ContextListener pushing the newest data to every Session that has such 
> JSP open? i.e. an event of my system publishes data and this is received 
> by my Webapp-specific ContextListener then from there I would like to 
> push such information to all sessions that have the relevant JSP open 
> .... using AJAX?
> - Otherwise would be possible having an action with continue refreshing 
> using plain HTML?

There's nothing like that built-in; you'd need to implement it using 
Ajax (or perhaps Commet). A polling solution (continue refreshing) can 
be done as simply as including an HTML meta refresh tag in the page. 
However, unless your underlying list changes frequently, that's a lot of 
unproductive overhead on the server.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org