Class ServerVersionChecker

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class ServerVersionChecker
    extends Object
    implements javax.servlet.ServletContextListener
    Checks Openbravo is deployed on a supported Server version, in case it is not, an error message is logged and deployment is stopped. Currently, checks are performed only for Tomcat.
    Author:
    alostale
    • Constructor Detail

      • ServerVersionChecker

        public ServerVersionChecker()
    • Method Detail

      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener
      • getServerName

        public static String getServerName()
        Returns current Servlet Container's name (ie. "Apache Tomcat")
      • getServerVersion

        public static String getServerVersion()
        Returns current Servlet Container's full version (ie. "8.5.31")