Database Reference
In-Depth Information
/db/myapp in the database: -->
<root server-name= "www.myapp.com" pattern= "/*"
path= "xmldb:exist:///db/apps/myapp/" />
<!-- Anything else, pass on to the XQueryServlet for default executing
from the filesystem: -->
<forward pattern= ".*\.(xq|xql|xqy|xquery)$" servlet= "XQueryServlet" />
</configuration>
The content of the controller-config.xml file must be in the http://exist.source
forge.net/NS/exist namespace. The format is:
<configuration xmlns= "http://exist.sourceforge.net/NS/exist" >
( forward | root )+
</configuration>
What happens is that all entries in the controller-config.xml file are examined from
top to bottom. If the remainder of the URL (the part after /exist ) matches with a
pattern attribute (which is a regular expression), this entry is used.
• A forward element passes control directly to a given servlet:
<forward pattern = string
servlet = string />
• A root element triggers the URL rewriting controller:
<root pattern = string
server-name? = string
path = string />
The path attribute tells eXist where to look for the URL rewriting controller, as
explained in “How eXist Finds the Controller” on page 198 . The default location
is within the filesystem, but if you want it to point to a location in the database,
start its value with xmldb:exist:///db/ .
When a server-name attribute is present (e.g., server-name="www.myapp.com" ),
this must match also, allowing you to associate a DNS name with your
application.
Proxying eXist Behind a Web Server
Another way of cleaning the URLs is by running eXist behind another web server, as
a proxy. This web server—we'll use Apache as an example—catches requests for
eXist, passes them on, and sends the responses back to the user.
Although this sounds like a bit of a detour, it is actually quite useful in certain
situations:
Search WWH ::




Custom Search