I’m trying to figure out how to get a hold of the url in my datastore java code to parse the parameter in the url. I’ve read the thread “accessing URL Parameters - msg#00434” suggesting:
" If you add &viewparams=p1:v1;p2:v2;… into your request the datastore will receive a data access request with a Query containing, among its Hints at the Hints.VIRTUAL_TABLE_PARAMETERS key,a hash map with the p1, v1, p2, v2 pairs."
I did not try exactly passing the parameter as “&viewparams:p1:v1…” as suggested, in debug mode, I saw Hints.Table, but it did not have any data.
The other suggestion "If you need something more generic and are willing to marry the store 1-1 to GeoServer you can also use the org.geoserver.ows.Dispatcher.REQUEST thread local, that one will contain the request and the various stages of its parsing, including the raw
kvp, the parsed kvp, the parsed request object and so on. "
This is exactly what I want to try, but I can’t figure out how to get a hold of the thread.
Thanks in advance for any advice
I’m trying to figure out how to get a hold of the url in my datastore java code to parse the parameter in the url. I’ve read the thread “accessing URL Parameters - msg#00434” suggesting:
" If you add &viewparams=p1:v1;p2:v2;… into your request the datastore will receive a data access request with a Query containing, among its Hints at the Hints.VIRTUAL_TABLE_PARAMETERS key,a hash map with the p1, v1, p2, v2 pairs."
I did not try exactly passing the parameter as “&viewparams:p1:v1…” as suggested, in debug mode, I saw Hints.Table, but it did not have any data.
The other suggestion "If you need something more generic and are willing to marry the store 1-1 to GeoServer you can also use the org.geoserver.ows.Dispatcher.REQUEST thread local, that one will contain the request and the various stages of its parsing, including the raw
kvp, the parsed kvp, the parsed request object and so on. "
This is exactly what I want to try, but I can’t figure out how to get a hold of the thread.
Thanks in advance for any advice
On Wed, Jun 19, 2013 at 3:35 PM, m l <ml032013@anonymised.com> wrote:
2. The other suggestion "*If you need something more generic and are
willing to marry the store*
* 1-1 to GeoServer you can also use the
org.geoserver.ows.Dispatcher.REQUEST thread local,
that one will contain the request and the various stages of its parsing,
including the raw
*
*kvp, the parsed kvp, the parsed request object and so on.* "
This is exactly what I want to try, but I can't figure out how to get a
hold of the thread.