4 Replies Latest reply on Aug 3, 2012 6:02 PM by CraigB

    web.show_document virtual directory

    Munish
      Hi,

      I want to show a document (pdf) that is on the application server.
      I know I can use web.show_document but the issue is where do I define virtual directory in forms 11.1.2.
      I have weblogic installed, is there any where on weblogic where I can open a file in gui and define it?

      Secondly what should I put into the file to define my virtual directory.

      I looked up on support.oracle.com and they do have some examples but it is for 10g forms and the file they want me to open is orion-web.xml does not exist in 11.1.2.

      So how can I do this in 11.1.2 forms.

      Thanks
      Munish
        • 1. Re: web.show_document virtual directory
          Christian Erlinger
          First of all it would be interesting if you installed the development or the deployment version of forms 11.1.2. If you have the deployment version you have an apache installed and it would be easy to create an aliasmatch in the httpd.conf. If you have the development version installed you need to do that in weblogic. See MOS
          +How to Create Virtual Mappings in Forms 11.1.x [ID 1063043.1]+

          cheers
          1 person found this helpful
          • 2. Re: web.show_document virtual directory
            CraigB
            Munish,
            You can define virtual directories in the httpd.conf which is found in the Oracle Http Server (OHS). It is highly recommended that you use the Enterprise Manager (EM) to make this change, but you can edit the file manually if you want.

            Towards the bottom of the file, you will find the *<IfModule mod_alias.c>* tag. This is the section where you would add directory alias's. The syntax for an alias is basically: "Alias </directory alias/> </directory to alias/>"
            For example, If I wanted to add an alias for a reports directory that exists outside of the WLS/FMw home I would add:
            Alias /my_reports/ "/usr/app/my_program/reports_dir/"
            This defines the basic alias, now you need to set the attributes of the alias. In this same tag section ( *<IfModule mod_alias.c>* ) as you scroll down, you will see directory tags. For example: <Directory "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/icons">

            In this section, you will need to add a new <Directory> entry for the alias you just created. Using the "MY_REPORTS" alias above, I would add:
                    <Directory "/usr/app/my_program/reports_dir">
                            Options MultiViews
                            AllowOverride None
                            Order allow,deny
                            Allow from all
                    </Directory>
            Notice, that I am specifying the actual directory path not the Alias directory path. For more detailed information, take a look at My Oracle Support (MOS) document *How to Create Virtual Mappings in Forms 11.1.x [ID 1063043.1].* You do need a MOS account to access this document.

            I forgot to mention that after you make these changes you will need to restart the OHS service.

            Hope this helps,
            Craig B-)

            If someone's response is helpful or correct, please mark it accordingly.

            Edited by: CraigB on Aug 1, 2012 8:10 AM
            • 3. Re: web.show_document virtual directory
              Munish
              Hi CraigB,

              I did setup the alias.
              now, how do I access those pdf's I have from the browser.
              I know it should be http://<hostname>:<port>/<virtual name>

              I am confused as to what port to use?

              I am sorry if I am confusing everyone, I am so confused myself but trying to learn and make sense out of it.

              Thanks
              Munish
              • 4. Re: web.show_document virtual directory
                CraigB
                You use the standard port defined for your Forms application. For example, if you have port 8888 defined you would use URL: http://<your_host_name>:8888/my_reports/<file_name.pdf>.

                Craig...