0 Replies Latest reply on Jun 30, 2006 1:13 PM by Anthony Whitford

    Virtual Directory

    Anthony Whitford Newbie

      We are trying to migrate to JBoss 4.0.4 GA (from another app server). One of the issues that we can't seem to get to work to our satisfaction is virtual directories.

      For WebLogic, there is the virtual-directory-mapping element in weblogic.xml like:

      <virtual-directory-mapping>
       <local-path>c:/usr/gifs</local-path>
       <url-pattern>/images/*</url-pattern>
       <url-pattern>*.jpg</url-pattern>
      </virtual-directory-mapping>


      For JRun, there is the virtual-mapping element in jrun-web.xml like:
      <jrun-web-app>
       <virtual-mapping>
       <resource-path>/flex/images/*</resource-path>
       <system-path>c:/images/production</system-path>
       </virtual-mapping>
      </jrun-web-app>


      So what is the equivalent in JBoss?

      We thought that we could just specify additional context elements in server.xml, but we discovered that then security isn't enforced because the webapp having the root context (/) is considered separate from the context serving the virtual directory. (Adding WEB-INF/web.xml to the various directories being shared is not viable.)

      I'm searching for the best solution... I'm trying to avoid alternatives like:
      1. Adding Apache as a front end, then using Apache to serve the virtual directories. Apache will need to do the authentication and SSL.
      2. Adding a Servlet do to the virtual directory. I'm kind of shocked that this hasn't already been done by someone -- I can't seem to find an open source version.
        What is the recommended solution?