I am building a java chatting web application.(Server and Client in one project)
follow is my condition
- Springframework 4.2.3
- JSP
- Maven Project which converted from a Dynamic Web Project
- Unable to use node.js
So User scenario in my head is
- User enters some text and press Send
- Ajax call to deliver messages to server
- Server checks the users who are currently connected(from Session maybe)
- Server calls other users script to append new message
I am quite confusing with step4. Is it possible that Java calls DOM event trigger?
How could a client get a new message event from server?
Thanks. :D
P.S. These days majority of chatting servers are event-driven. Is it possible to build an event driven chatting server with Java?