Mark and Chew Kok,

On 4/3/23 12:47, Mark Thomas wrote:
On 02/04/2023 13:44, Chew Kok Hoor wrote:
Hi,

     As part of a way to prevent concurrent login, and to re-assign a
session back to a request based on JWT token (for clients that cannot pass
us cookies), we need to access to the 'findSession' and 'findSessions' in
org.apache.catalina.Manager.

     Is it true the only way to get the manager using
ServletContext.getManager() is by using privileged="true" in the
context.xml?

There is no ServletContext.getManager() method.

privileged is use to control access to Servlets that implement ContainerServlet.

The ContainerServlet interface is one way to access Tomcat's internals. Another option is reflection.

You can also get sessions via JMX within the same JVM.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to