ok, it seems that I have found something, but still can't use it. The method I was thinking of is org.apache.catalina.Session.access();
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/session/StandardSession.html#access%28%29
Tomcat's HttpSession implementation is StandardSession object, which also implements org.apache.catalina.Session interface which has the "access" method.
So, I have tried to call in this way (after adding lib/catalina.jar to project's classpath)
((org.apache.catalina.Session) request.getSession()).access();
this did not work, cause tomcat did not want to deploy web application with catalina.jar as local dependency.
So, I tried reflection (after removing catalina.jar from deps):
request.getSession().getClass().getMethod("access").invoke(request.getSession());
But this did not work either, cause though debugger shows request.session attribute of type StandardSession (which has the "access" method I need), the request.getSession() call returns StandardSessionFacade (
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/session/StandardSessionFacade.html) wrapped around this object, which does not provide access to "access" method of the wrapped session.
So it seems that the call I need is hidden rather well.