How do I share object or data between users in web application?
Category: javax.servlet, viewed: 6K time(s).
In a web application there are different type of scope where we can store object or data. There are a page, request, session and application scope.
To share data between users of the web application we can put shared object in application scope which can be done by calling setAttribute() method of the ServletContext. By this way data can then be accessing by other users by calling the getAttribute() method of the ServletContext.