I have a Login page from where I Login. The submit for this login is being handled by the doPost() of servlet.Here i set the session with the Loginid and passwd in it. Then I have another page which asks for information from the server.The submit for this form will call doGet() and this in turn tries to get the session which has been currently set thru doPost().But what I m getting is a diff session with the heetsession.getValueNames() returning 0 length String. Can anyone tell me why this is happening? thanks in adv, Chinmay....
The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Hi, I did get over the problem.But I dont understand how. Here is what I did? My login page called the Servlet in this way, <form action="http://184.108.40.206:8080/servlet/MyServlet" method=Post> Where "220.127.116.11" is the ip of my machine. But the page which did a get , call my servlet in this way, <form action="http://localhost:8080/servlet/MyServlet" method=Get> What differance does this make for Session Management,since both localhost and 18.104.22.168 point to the same machine? Conclusion:- Problem Solved But Not Understood.
They are the same machine, but the browser can't tell that. It will only send the session id if it can verify that they are the same server. even if you send the domain name in some links and the IP in others you will still lose the session. Dave