rule2.setSymbolizers(new Symbolizer[] { linesym });
FeatureTypeStyle ftsL = sFac.createFeatureTypeStyle();
ftsL.setRules(new Rule[] { rule2 });
ftsL.setFeatureTypeName("querytest");
PolygonSymbolizer polysym = sFac.createPolygonSymbolizer();
polysym.setGeometryPropertyName("polygon");
Fill myFill = sFac.getDefaultFill();
myFill.setColor(filterFactory.literal("#ff0000"));
polysym.setFill(myFill);
polysym.setStroke(sFac.getDefaultStroke());
Rule rule = sFac.createRule();
rule.setSymbolizers(new Symbolizer[] { polysym });
FeatureTypeStyle ftsPoly = sFac
.createFeatureTypeStyle(new Rule[] { rule });
// ftsPoly.setRules(new Rule[]{rule});