2 Replies Latest reply on Nov 23, 2015 6:53 PM by Jakub Świderski

    Do JBoss EAP 6 and WildFly support Virtual Directories?

    Jakub Świderski Newbie



      In many servers it is possible to define fake path inside application which with help of the server maps to some folder outside of application context.

      In Tomcat 7 it is possible with aliases, in Tomcat 6 by defining extra context in server.xml, in GlassFish through alternatedocroot, in Weblogic through virtual-directory-mapping element in weblogic.xml, in Jetty by defining extra handler in Jetty.xml.

      In JBoss 6 AS it was possible by defining extra Context in context.xml and usage of mklink.


      To give better understanding of what I'm talking about let me present example for Tomcat 8:

      Inside MyApp/META-INF/context.xml I enter:
      <Context antiJARLocking="true" path="/MyApp" reloadable="true" >


             <PreResources base="C://myimages" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/images" />


         <Valve className="org.apache.catalina.valves.RemoteAddrValve"  allow=".*" />


      Now, path  MyApp/images will map to C://myimages directory which is outside of application context and even server. I keep uploaded images and files there.



      In JBoss AS7 virtual directories are only possible through custom servlet. It seems to be also the case in WildFly and JBoss EAP. Can anyone confirm/deny?

      Do any of these servers support it?

      Are there any plans to introduce such feature?