cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <benanderson...@gmail.com>
Subject Re: [eXist-open] $request using xmlrpc?
Date Mon, 28 Feb 2005 16:30:19 GMT
> Looking in the XQueryGenerator
> code, it would be fairly trivial to automatically pass all request
> parameters to exist.

I found this to be necessary for request parameters with multiple
values, ie /someUri?status=complete&status=waiting

I just inserted the following code at the end of the declareParameters method:

        Request request = ObjectModelHelper.getRequest(objectModel);
        for (Enumeration e = request.getParameterNames();
e.hasMoreElements();) {
            String paramName = (String)e.nextElement();
            String[] values = request.getParameterValues(paramName);
            if (values.length == 1) {
                service.declareVariable(paramName, values[0]);
            } else {
                service.declareVariable(paramName, values);
            }
        }

this seems to work fine so far.
-Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message