In case the attributes are set in a context, will it not cause discrepancy among other contexts(on other jvm's)?? Or there is a way they are replicated??
From Servlets 2.3 specification:
Context attributes are local to the VM in which they were created. This prevents ServletContext attributes from being a shared memory store in a distributed container. When information needs to be shared between servlets running in a distributed environment, the information should be placed into a session (See Chapter SRV.7, �Sessions�), stored in a database, or set in an Enterprise JavaBeansTM component.
That means... if i want to share data, across the application.. and do not want to use listeners or populate some model class. I cannot use the context to share the data..
If you want to share the data among servlets you must use either session or database in a distributed envrionment. Because context exists in multiple JVMs.
bye for now