3 Replies Latest reply on May 31, 2016 2:42 PM by Nicklas Karlsson

    How to change physical deployment filepath?

    Adam Vainder Newbie

      Hi all,

       

      Is there a way to configure the physical deployment filepath under tmp? If so, how?

       

      I'm trying to take a legacy application from a very old WebSphere instance into WildFly 10 as a POC for moving to upgrading infrastructures.

       

      One factor of this application is that it reads from a properties file whose expected name varies based on the real directory path - expected to be based on the name of the ear.

       

      e.g.

      The EAR is named ABCD.ear containing XYZ.jar

      Application calls servlet.getServletConfig().getServletContext().getRealPath("/");

      Expected response would be something like  <App_Server_Dir>/[...deploy directory structure...]/ABCD/XYZ.jar/

      From this, the application would pull "ABCD" from the filepath and look for ABCD.properties.

      (Please note that multiple instances with different names will exist - and that using individual property files to tell what filename to look for is not currently an option)

       

      However, with Wildfly 10, the EAR and WAR are being exploded into the tmp directory with filepaths that look like:

       

      [Wildfly home]/standalone/tmp/vfs/deployment/deployment491d0cf53d402c77/XYZ.war-80dfcbee1ded1662


      Note the random deployment###### directory, causing the application to look for "deployment491d0cf53d402c77.properties".


      Note that the EAR name is not reflected in any way.


      I have tried changing the servlet context using application.xml in the EAR's META-INF. I've tried with jboss-web.xml. Neither caused any effect to the physical directory path.


      I can't figure out what part (if any) of jboss-deployment-structure.xml would help.

       

      Thank you for any suggestions!