Thanks for the replies,
Carlo: comma did not work either 
http://localhost:8090/geoserver/greensad/wms?LAYERS=layer1,layer2&QUERY_LAYERS=layer1,layer2&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-138.689604,-68.094802,163.689604,83.094802&FEATURE_COUNT=2000&HEIGHT=400&WIDTH=800&FORMAT=image/png&INFO_FORMAT=text/html&SRS=EPSG:4326&X=368&Y=46&FILTER=(<ogc:Filter xmlns:ogc=“http://www.opengis.net/ogc”> … </ogc:Filter>),(<ogc:Filter xmlns:ogc=“http://www.opengis.net/ogc”> … </ogc:Filter>) → “org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1174; Content is not allowed in trailing section. Content is not allowed in trailing section.”
Chris: I was unclear when I mentioned CQL_FILTER, I’m using an OGC-XML-filter (as you see from above). I was just saying that what the documentation said about CQL_FILTERS did not work for the FILTER variable (using semicolon to separate the filters).
Still can’t seem to figure out this, and I’ve started to take a look at the source code myself to try to locate it, but I’m not very familiar with the Geoserver code 
Many thanks,
Aleksander Vines
Chris Snider chris.snider@anonymised.com , 3/28/2014 3:26 PM:
I use the CQL_FILTER= with multiple layers.
For Example, layers=BASE:Countries,BASE:States_Provinces&styles=&CQL_FILTER=INCLUDE;Name=’SomeProvinceName’
If you don’t want to restrict a layer result set, use the INCLUDE filter. Or the EXCLUDE if you want to remove it completely.
The filters themselves can be built up to more complexity
CQL_FILTER=(MyAttribute=’Value1’ and MyOtherValue=’Value2’) or MyThirdAttribute=’Value3’
Chris Snider
Senior Software Engineer
Intelligent Software Solutions, Inc.

From: carlo cancellieri [mailto:carlo.cancellieri@anonymised.com]
Sent: Friday, March 28, 2014 6:31 AM
To: Aleksander Vines
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] specify a filter for each layer in a GetFeatureInfo request
Aleksander,
I’ve never used them anyhow have you tried with commas?
filter=(FILTER),(FILTER),…
Let me know, we can take a look at the code if needed.
Cheers,
Carlo
2014-03-28 12:34 GMT+01:00 Aleksander Vines <aleksander.vines@anonymised.com>:
Hi list,
according to the documentation at http://docs.geoserver.org/stable/en/user/services/wms/vendor.html#filter : “If more than one layer is specified in the layers parameter then a separate filter can be specified for each layer.”
But it does not say how I can do this, on cql_filter, each filter can be seperated by ‘;’ but it does not work like that for the filter. It further says that the filter can contain a list of several filters, enclosed in parentheses, but it seemingly has nothing to do with one filter for each layer.
I’ve been trying several forms (yes the final requests are url-encoded):
filter=(filterForFirstLayer;filterForSecondLayer)
filter=(filterForFirstLayer);(filterForSecondLayer)
filter=filterForFirstLayer;filterForSecondLayer
I’m sure the solution is easy but I can’t seem to find it.
Thanks,
Aleksander Vines
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK for more information.
==
Dott. Carlo Cancellieri
@cancellieric
Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users