Interface TomcatServerFactory

All Known Implementing Classes:
BasicTomcatServerFactory

public interface TomcatServerFactory
Interface for creating embedded Tomcat servers.

Mirrors org.apache.juneau.marshall.microservice.jetty.JettyServerFactory but uses the programmatic Tomcat façade instead of a jetty.xml document.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.catalina.startup.Tomcat
    create(File baseDir)
    Create a new initialized embedded Tomcat server.
  • Method Details

    • create

      org.apache.catalina.startup.Tomcat create(File baseDir) throws Exception
      Create a new initialized embedded Tomcat server.

      The returned server is configured with the specified Catalina base directory and a root context (mounted at "") but is not yet started and has no connector port assigned — the TomcatServerComponent assigns the port and materializes the connector before calling Tomcat.start().

      Parameters:
      baseDir - The writable Catalina base / work directory to use for this server.
      Returns:
      A newly-created but not-yet-started Tomcat server.
      Throws:
      Exception - Any exception.