Search code examples
tomcattomcat7

Custom session manager in tomcat


Where can I find documentation on creating a custom session manager for Tomcat?

For example:

How do I configure my session manager in tomcats server.xml?
What interface must be implemented to use my session manager?


Solution

  • Q: How do I configure my session manager in tomcats server.xml ?
    A: <Manager... goes inside <Context.... From Tomcat docs:

    A Manager element MAY be nested inside a Context component. If it is not included, a default Manager configuration will be created automatically, which is sufficient for most requirements, — see Standard Manager Implementation below for the details of this configuration.

    Q: What interface must be implemented to use my session manager ?
    A: org.apache.catalina.Manager