Bob,
Thanks for the reply. My problem is that the session info I need is not
of the session that makes the request. I need to check other sessions in
the same context. I can use the request because it is in the same
context, so the manager is the same.
This servlet is called internally from the app, and checks if some
session exists. It is similar to the case of obtaining all active
sessions from one context using the manager inside the servlet code
(findSessions). If someone have this piece of code (or similar), it will
serve me.
Regards
Carlos
Bob Hall escribió:
--- Carlos Alonso Vega <[EMAIL PROTECTED]> wrote:
I am trying to obtain data about a session inside a
servlet, the code
seems to be simple as
localSession =
Ctx.getManager().findSession(sessionId);
My problem is that I do not know how to obtain the
Ctx object from a
request (HttpServletRequest)
Thanks in advance
Carlos,
To obtain the HttpSession for the current request:
HttpSession sess = req.getSession();
OR
boolean create = false; (or true)
HttpSession sess = req.getSession(create);
HTH,
Bob
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]