Category: Howto

September 13

No, no this isn’t another DBFS post but a more simple and direct way of achieving the same

😉

Just had a funny discussion with Roel Hartman regarding how to trick the Tomcat APEX 4 setup in believing that the virtual XFILES directory in the database was actually available on disk of the local server. This is probably not the way to solve this but should be realized via Tomcat / APEX 4. The OTN Development virtualbox environment with APEX 4 gets his “/i/” images via Tomcat from the directory.

[oracle@localhost i]$ pwd
/home/oracle/apache-tomcat-6.0.20/webapps/ROOT/i

The easiest solution would have been to copy the XFILES images and files in a directory called XFILES under the ROOT directory.

[oracle@localhost i]$ pwd
/home/oracle/apache-tomcat-6.0.20/webapps/ROOT/XFILES

Investigating the APEX 3 and 4 OTN Development virtualbox environments, I discovered the following way to solve it as well, which in this case was implemented by Mark Drake.

What you could do in this situation, while keeping it “as is”, so XFILES files and images in the database are still in the XDB Repository, is to “trick” the Tomcat server so the virtual directory could be accessed via WebDAV as if it were a file system mount. There is an open source project out there called “davfs”, which is nowadays a GNU Project, and can be found here for download (“davfs2”) which could achieve this for us.

As it is said there:

August 30
August 25

Do you read FAQ…?

Somehow I keep people reminding there is a FAQ URL on the XMLDB forum and even then people refuse to read those good examples… Anyway found two great posts I want to share and remember on this, my, web “notepad”. Besides the treewalker example, I tested the examples of those mentioned in the XQuery post on a Oracle 11.2 database.

As far as I could find the treewalker example is part of DOM V2 and not mandatory to implement but I wonder how I can get around the local() stuff, anyway, I will have to investigate a bit further if its just me being a novice in XQuery or that I am missing out on details/info. The XQuery post only demonstrates to me how powerful this extra query language is in an Oracle database and that it is time for me to learn this properly…

The posts that I was referring to:

…be aware of the use of the (double quote instead single quote), namespaces (indeed apparently always an issue) and using (::) in SQL*Plus… The (::) is needed in SQL*Plus to mark that the “;”  is not seen as direct processing instruction for SQL*Plus, but in this case, is for the XQuery engine.

The headlines follow the ones in the XQuery post…