Hi Guys

I need to track sessions based on the Client's IP, instead of using Cookies
or URL re-writing.. (My clients don't support Cookies, and I cannot re-write
the URL). I know this sounds useless, but believe me... this is what I
need.... ;-)

I found that in the Catalina internal API there is a Manager class
(org.apache.catalina.Manager) that provides some methods to manipulate the
Sessions base:

    Manager.findSession(java.lang.String id)
    Manager.add(Session session)
    etc..

The problem is that I couldn't find a way get a reference for the Manager,
from the servlet...
I was trying to do something like:

    Context context = request.getContext();         <== No such method
available
    Manager manager = context.getManager();
    String id = request.getRemoteAddr().toString();
    Session sesion = manager.findSession(id);
    if (sesion == null) {
        sesion = manager.createSession();
        sesion.setId(id);
    }

but the getContext() method is not available from the
javax.servlet.http.HttpServletRequest interface.. (It's only accesible from
the internal org.apache.catalina.connector.RequestBase class).

Is there a way to access some Manager class implementation (ManagerBase,
StatandardManager) within the servlet?
Do someone have some idea for facing this problem?

Basically, I require to use the client IP address, as the only ID in the
Session base.
I would appreciate any help, from more experienced users...

Thanks, very much...

Jose Miguel Guzman
Santiago, Chile.

PS: Sorry for my English..


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to