2 Replies Latest reply on Apr 1, 2019 3:37 AM by priyanka.wadekar1

    How to Override context-param in web.xml in Jboss EAP 6.4 and 7.1 at deployment time

    priyanka.wadekar1

      I want to deploy project war on Jboss EAP 6.4 and 7.1 with new values provided for context-param parameters in web.xml without editing existing war.

      Default war works fine on Tomcat 9 as it has "XML Configuration file path" option available on manager console gui to override values of default web.xml.

      but no such option is available in Jboss EAP Admin Console (http://localhost:9990/console/App.html#home) like tomcat for deployment.

      If overriding at deployment time isn't at all possible then any official doc reference for such limitation would be helpful.

      My web.xml -

      <?xml version="1.0" encoding="utf-8"?>

      <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

      <display-name>Myproject Web Service</display-name>

       

      <context-param>

      <param-name>appserver.type</param-name>

      <param-value>tomcat</param-value>

      </context-param>

      <context-param>

      <param-name>myproject.logpath</param-name>

      <param-value></param-value>

      </context-param>

      <context-param>

      <param-name>myproject.dbtype</param-name>

      <param-value></param-value>

      </context-param>

       

      <listener>

      <listener-class>myproject.server.ApplicationStartListener</listener-class>

      </listener>

      <!-- ...serverlet and jsp mapping... -->

      </web-app>

       

      While deploying, i want to change as -

       

      <context-param>
        
      <param-name>myproject.logpath</param-name>
        
      <param-value>D:\myproject\vXX\workspace</param-value>
      </context-param>
      <context-param>
        
      <param-name>myproject.dbtype</param-name>
        
      <param-value>MSSQL</param-value>
      </context-param>