|
application is an instance of ServletContext
The scope of ServletContext exists in the entire server, all users can access
Chat information is encapsulated into objects, and then put into this range
ServletContext.setAttribute ("key", chat history);
Then just use the getAttribute method when needed. . |
|