Hi,
why not use this:
for put a value in the session
HttpSession session = request.getSession(true);
session.putValue("id",myId);
for read the value
HttpSession session = request.getSession(true);
String Id=(String)session.getValue("id");
regards
Rinaldo
[EMAIL PROTECTED]
-----Messaggio originale-----
Da: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]Per conto di
Marjou Xavier
Inviato: mercoledì 4 aprile 2001 15.24
A: [EMAIL PROTECTED]
Oggetto: HttpSession id
Hello,
I would like to create an HttpSession with my own String id. Why isn't it
possible to create this object with for example: getSession(boolean create,
String id) in HttpServletRequest, id beeing the wished id associated to this
HttpSession object ?
Or did I missed something in the Servlet API ? (e.g. is it possible to do it
with setAttribute("id", "myId") ?)
Thanks,
Xavier Marjou
___________________________________________________________________________
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
___________________________________________________________________________
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