On my website (driven by eXist-db 4.4) I have a search page:
http://localhost:8081/exist/apps/deheresi/search
This contains a simple form that submits a search request like:
http://localhost:8081/exist/apps/deheresi/search?keyword=someword
The page is served up through templates in eXist-db which are triggered by controller.xql
receiving the request:
else if (starts-with(lower-case($exist:path), "/search")) then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<forward url="{$exist:controller}/search.html"/>
<view>
<forward url="{$exist:controller}/modules/view.xql">
<add-parameter name="searchterm" value="{$exist:resource}"/>
<add-parameter name="pagetype" value="search"/>
</forward>
</view>
</dispatch>
In this context, I would assume that $exist:resource
would contain the some string which includes ?keyword=someword
or something to that effect (so that I can further parse the request). But nothing is being output to the parameter. I have a feeling I'm not understanding exactly how to get the query string from an http request in the eXist controller.
Many thanks in advance for any advice.