Database Reference
In-Depth Information
# Cookies must be adapted to allow the session mechanism to work:
ProxyPassReverseCookiePath /exist /
ProxyPassReverseCookieDomain localhost myapp.com
RewriteEngine on
RewriteRule ^/(.*)$ /$1 [PT]
</VirtualHost>
There was another example of proxying earlier in the topic (using the Nginx web
server), which focused on security; see “Reverse proxying” on page 185 .
Requests, Sessions, and Responses
An entry to a web application starts with a request from a web client. A request con‐
sists of a URL but might also contain, for example, parameters or an uploaded file. In
between requests you probably want to keep information for the current user in a
session . The answer to a request is called a response , and there are several things you
might want to control here too.
To work with requests, sessions, and responses, eXist uses extension modules. This
section will provide you with an overview of the functionality found in these modules
(for the full details, please refer to the function documentation browser). Along the
way we'll reveal some tips and tricks.
The request Extension Module
All details about an incoming HTTP request can be accessed through the request
extension module. This module is really just a very simple XQuery wrapper around
the underlying HttpServletRequest Java class that eXist handles for you. For
instance:
request:get-uri will give you the original URI as received from the client.
• There are other functions for inspecting details, like request:get-remote-port
for checking the TCP port number.
• The functions request:get-parameter-names and request:get-parameter give
you access to the request parameters.
request:get-cookie-names and request:get-cookie-value let you access the
data stored in cookies.
Search WWH ::




Custom Search