1 Reply Latest reply on Jan 26, 2018 6:27 AM by Anup Dey

    context level configuration

    awanish kumar Newbie

      i need to use same system variable in two application with different value. lets WebApp1.war can run with my.property.value=Cat and WebApp2.war can run with my.property.value=Dog at the same time. is it possible in wildfly? just like tomcat provide feature : https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context

        • 1. Re: context level configuration
          Anup Dey Expert

          The Context element represents a web application, which is run within a particular virtual host. Each web application is based on a Web Application Archive (WAR) file, or a corresponding directory containing the corresponding unpacked contents, as described in the Servlet Specification (version 2.2 or later). For more information about web application archives

           

          The web application used to process each HTTP request is selected by Catalina based on matching the longest possible prefix of the Request URI against the context path of each defined Context. Once selected, that Context will select an appropriate servlet to process the incoming request, according to the servlet mappings defined in the web application deployment descriptor file (which MUST be located at /WEB-INF/web.xml within the web app's directory hierarchy).

           

          You may define as many Context elements as you wish. Each such Context MUST have a unique context path. In addition, a Context must be present with a context path equal to a zero-length string. This Context becomes the default web application for this virtual host, and is used to process all requests that do not match any other Context's context path.

           

          For JBoss Web, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file.