geoserverviewparams

How to set string conditions for param to viewparams


SQL function like this "SELECT * FROM myFunction('%FILTER%')", where FILTER: and any_param >= 100 and any_param < 1000. When I run geoserver/cite/wms?....&viewparams=FILTER:and any_param >= 100 and any_param < 1000; I get message error "org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog." But, if I maked this param for default param, it is work fine. What is problem? Maybe I need screening any symbols?


Solution

  • FILTER is a OGC protocol keyword, I'm guessing you are hitting some validation checks designed for it (the contents is supposed to be an XML document). Use a different variable name.