Posted By:
Abhijit_Singh
Posted On:
Thursday, March 26, 2009 06:49 AM
Hi, I need to develop one code in which the user is authenticated based on his username/password. Authentication is a one time activity. For all the subsequent requests, the user shouldn't be prompted for login. I need to use the sessionId for all the subsequent request. The problem is, if I use realm, I can implement this functionality. But, I am not suppose to use a web browser and I need to hit the server using httpconnection (from java code). Presently, what I am doing is. I hit one of the servlets and a session is created. I get the session Id back in the response header. Now for the subsequent requests, I append the jsessionid in the URL. This is working fine. But, if the session times-out, I don't get any response.
More>>
Hi,
I need to develop one code in which the user is authenticated based on his username/password.
Authentication is a one time activity. For all the subsequent requests, the user shouldn't be prompted for login. I need to use the sessionId for all the subsequent request.
The problem is, if I use realm, I can implement this functionality. But, I am not suppose to use a web browser and I need to hit the server using httpconnection (from java code).
Presently, what I am doing is. I hit one of the servlets and a session is created. I get the session Id back in the response header. Now for the subsequent requests, I append the jsessionid in the URL. This is working fine. But, if the session times-out, I don't get any response.
I need to configure/write a code such that whenever a stale session Id is used, the server should return a customised message.
Please help!!!
<<Less