views:

37

answers:

0

Rigth now I am using two glassfish servers for my application. At the time of loggin in I set the cookie in first server in following manner, Cookie userCokey1=null; userCokey1=new Cookie("userName", new String(Base64.encodeBase64(userName.getBytes()))); userCokey1.setPath("http://192.168.1.132:8080/touch/"); res.addCookie(userCokey1);

after this I redirect the user on second server.

Then, at the time of log out again I redirect user from second server to the first server. There I try to delete the cookies on first server in below manner.

userName.setDomain("http://192.168.1.132:8080/touch/"); userName.setMaxAge(0); response.addCookie(userName);

So my problem is, I am not able to delete this cookie as server is unable to detect the cookie on this server. So can anybody tell me how to handle this situation, as i have to delete this cookies.

Plz reply faster.