2

The trouble is, while PL/SQL procedures do generate HTML, I cannot make image folder work. That is, when I try to insert an IMG tag, it shows that it can't find that file in /xxx/img folder.

I tried to redefine DocumentRoot in httpd.conf - it works only on that folder itself, not recursively. I tried to change DOCUMENT_ROOT in dads.conf - it doesn't work at all.

So the question is, how can I make images deep inside that root folder show up?

Fabio Salvalai
  • 2,479
  • 17
  • 30
Lachrimae
  • 51
  • 9
  • Oracle HTTP Server is basicaly improved Apache server, your images has nothing to do with pl/sql container. So just configure it as plain apache server. – Nagh Sep 17 '15 at 22:53

2 Answers2

3

At last I have found an answer and a reason of this behavior.

The reason is Oracle's hand-made handler, pls_handler, used for any DADs, made up as Apache Locations.

Trying to create folders for storing images like $ORACLE_HOME/htdocs/myapp/img, I interfered with that directive:

<Location /myapp>
    SetHandler pls_handler
    # lots of stuff
</Location>

And thus, anything under $ORACLE_HOME/htdocs/myapp folder was processed as PL/SQL procedures.

Lachrimae
  • 51
  • 9
1

This is a plain Apache configuration issue. You simply must define an alias in your Apache configuration file.

Assume that your image resources are in a directory /middleware/project/img. Then just add the following line to your httpd.conf or (that's where I configure it) dads.conf:

Alias /i/ "/middleware/project/img/"

If you now have a file alert.png in your /middleware/project/img directory you can access it with an /i/alert.png url.

doberkofler
  • 9,511
  • 18
  • 74
  • 126