Hi users,


        //get the username, password from the HTML form.
        username = reqp.getParameterValues("username")[0];
        password = reqp.getParameterValues("password")[0];


        //create a new session once the user logs in...
        HttpSession session = reqp.getSession(true);
        String user_id = (String)session.getValue(session.getId());

//assign the username to the user_id.
        user_id = username;


        session.putValue(session.getId(), user_id);

String[] names = session.getValueNames();
 for (int i = 0; i < names.length; i++) {
   out.println(names[i] + ": " + session.getValue(names[i]) + "<BR>");
 }


I am using the above code to get the different session_ids for different
user_ids
But iam getting same session_id everytime i log in with different user_id.
Please let me know what the right way to do.


Thankyou
Srikanth Patibanda
IT Specialist
Entergy Corporation
Ph: (W)504-576-5444

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to