Class Container

java.lang.Object
com.opensymphony.module.sitemesh.util.Container

public final class Container extends Object
Utility for determining the Servlet Container the application is running in. Currently supported containers: Tomcat, Resin, Orion, OC4J, WebLogic, HPAS, JRun, Websphere.

Usage:

if (Container.get() == Container.TOMCAT) { .... }
Author:
Joe Walnes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The Constant HPAS.
    static final int
    The Constant JRUN.
    static final int
    The Constant ORION.
    static final int
    The Constant RESIN.
    static final int
    The Constant TOMCAT.
    static final int
    The Constant UNKNOWN.
    static final int
    The Constant WEBLOGIC.
    static final int
    The Constant WEBSPHERE.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    get()
    Get the current container.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Container

      public Container()
  • Method Details

    • get

      public static int get()
      Get the current container.
      Returns:
      the int