3 Replies Latest reply: Apr 14, 2003 5:50 PM by 3004 RSS

    virtual directory mapping in weblogic platform 7.0

    3004
      Hi. I noticed in WebLogic Platform 7.0 there is a entry for
      WEB-INF/weblogic.xml that defines a virtual directory. Example:

      <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
      Application 7.0//EN"
      "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
      <weblogic-web-app>
      <virtual-directory-mapping>
      <local-path>C:\webapps\context\x\y</local-path>
      <url-pattern>/images/*</url-pattern>
      </virtual-directory-mapping>
      </weblogic-web-app>

      In this case I'm assuming that a request of the form
      http:/host:7001/context/images/z.gif would map to the physical file
      C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
      my assumption about it's use incorrect? Is the syntax of
      <local-path/> or <url-pattern/> wrong? Is there something you have to
      do to get WebLogic to recognize the weblogin.xml file?

      This is urgent. Please help.

      Thanks.
      Scott Steimle
      Software Engineer
      Convera
        • 1. Re: virtual directory mapping in weblogic platform 7.0
          3004
          From the developer


          Virtual directories just replace the doc root. The doc root in your case
          is C:\webapps\context\x\y. The request uri is /images/Z.gif. So the whole
          thing resolves to C:\webapps\context\x\y\images\Z.gif. Which is where the
          image should be located.

          We have cleared up the docs. Sorry for any inconvenience.




          Scott Steimle wrote:
          Hi. I noticed in WebLogic Platform 7.0 there is a entry for
          WEB-INF/weblogic.xml that defines a virtual directory. Example:

          <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
          Application 7.0//EN"
          "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
          <weblogic-web-app>
          <virtual-directory-mapping>
          <local-path>C:\webapps\context\x\y</local-path>
          <url-pattern>/images/*</url-pattern>
          </virtual-directory-mapping>
          </weblogic-web-app>

          In this case I'm assuming that a request of the form
          http:/host:7001/context/images/z.gif would map to the physical file
          C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
          my assumption about it's use incorrect? Is the syntax of
          <local-path/> or <url-pattern/> wrong? Is there something you have to
          do to get WebLogic to recognize the weblogin.xml file?

          This is urgent. Please help.

          Thanks.
          Scott Steimle
          Software Engineer
          Convera
          --
          Rajesh Mirchandani
          Developer Relations Engineer
          BEA Support


          • 2. Re: virtual directory mapping in weblogic platform 7.0
            3004
            I see. In my case, x == images, so if I reverse my directory
            structure I could still get this to work for me. For instance:

            <virtual-directory-mapping>
            <local-path>C:\webapps\context\y</local-path>
            <url-pattern>/images/*</url-pattern>
            </virtual-directory-mapping>

            /images/z.gif would map to C:\webapps\context\y\images\z.gif.

            I'll have to weigh changing our directory structure vs. keeping the
            servlet we have that rewrites the URL.

            Thanks for your help.
            Scott Steimle.

            Rajesh Mirchandani <Reply@ToNewsgroup.Only> wrote in message news:<3D9C788A.9E8F75D0@ToNewsgroup.Only>...
            From the developer


            Virtual directories just replace the doc root. The doc root in your case
            is C:\webapps\context\x\y. The request uri is /images/Z.gif. So the whole
            thing resolves to C:\webapps\context\x\y\images\Z.gif. Which is where the
            image should be located.

            We have cleared up the docs. Sorry for any inconvenience.




            Scott Steimle wrote:
            Hi. I noticed in WebLogic Platform 7.0 there is a entry for
            WEB-INF/weblogic.xml that defines a virtual directory. Example:

            <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
            Application 7.0//EN"
            "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
            <weblogic-web-app>
            <virtual-directory-mapping>
            <local-path>C:\webapps\context\x\y</local-path>
            <url-pattern>/images/*</url-pattern>
            </virtual-directory-mapping>
            </weblogic-web-app>

            In this case I'm assuming that a request of the form
            http:/host:7001/context/images/z.gif would map to the physical file
            C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
            my assumption about it's use incorrect? Is the syntax of
            <local-path/> or <url-pattern/> wrong? Is there something you have to
            do to get WebLogic to recognize the weblogin.xml file?

            This is urgent. Please help.

            Thanks.
            Scott Steimle
            Software Engineer
            Convera
            • 3. Re: virtual directory mapping in weblogic platform 7.0
              3004

              To: The tech support engineers,

              Could you please update your documentation. I spent some frustrating hours trying
              to get this to work.

              Thanks
              Aashish

              Rajesh Mirchandani <Reply@ToNewsgroup.Only> wrote:
              From the developer


              Virtual directories just replace the doc root. The doc root in your case
              is C:\webapps\context\x\y. The request uri is /images/Z.gif. So the whole
              thing resolves to C:\webapps\context\x\y\images\Z.gif. Which is where
              the
              image should be located.

              We have cleared up the docs. Sorry for any inconvenience.




              Scott Steimle wrote:
              Hi. I noticed in WebLogic Platform 7.0 there is a entry for
              WEB-INF/weblogic.xml that defines a virtual directory. Example:

              <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
              Application 7.0//EN"
              "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
              <weblogic-web-app>
              <virtual-directory-mapping>
              <local-path>C:\webapps\context\x\y</local-path>
              <url-pattern>/images/*</url-pattern>
              </virtual-directory-mapping>
              </weblogic-web-app>

              In this case I'm assuming that a request of the form
              http:/host:7001/context/images/z.gif would map to the physical file
              C:\webapps\context\x\y\z.gif. However I cannot get this to work.
              Is
              my assumption about it's use incorrect? Is the syntax of
              <local-path/> or <url-pattern/> wrong? Is there something you have
              to
              do to get WebLogic to recognize the weblogin.xml file?

              This is urgent. Please help.

              Thanks.
              Scott Steimle
              Software Engineer
              Convera
              --
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support