• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to push data from server to client in struts

 
Nagendra Siram
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to send data to client from server without client knowledge(no request from client to be made). If two users are using the application. If User1 changes data, User2 should be notified automatically. how can i do with struts? please help
 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP protocol doesn't support push. The client has to pull the data from the server. So you'll have to make calls (normally ajax calls) to the server at regular intervals...
 
Nagendra Siram
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for info. A small query, so you mean there is no way to do this in struts. and how are chat applications implemented in struts
 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no way of pushing data in HTTP, so neither can struts do anything about it, nor can JavaEE. All chat applications make ajax requests to the server at regular intervals to a specific service on the server which sends any new chats as a response...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic