First of all thanks to all for giving the support from the starting.
I need a new requirement. I need to call DB2 to get the records for the first time user login and need to maintain
in the application scope. So when the next user comes in, no need to call DB2 again for the records. If the session
is not available then only need to call DB2. Means the first user time only call to database is made. So for next users the
application is using the existing table which is maintain in the session. Means the burden to calling Database is reduced.
Can anybody help me how to maintain session scope as Application. Please give me a sample lines of code to solve this one.
All the one I need to write in the servlet only.
Your requirement is not clear. It seems like you are trying to grab user information for all the users whenever the firts user logs in, and then have this information available for all subsequent users that try to login. Please verify.
Also, as mentioned, session scope is different from application scope. Your application's needs will determine which is appropriate to use.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
subject: Doubt in Setting the session scope as Application