resp.setContentType("text/xml");
if ( search ) {
//send back the opensearch template
//write out the opensearch template
Configuration cfg = new Configuration();
cfg.setClassForTemplateLoading(getClass(), "");
Map ctx = new HashMap();
ctx.put("CONTACT_ADDRESS", myGeoserver.getContactEmail());
ctx.put( "LAYER", layer );
ctx.put( "BASE_URL", baseUrl );
Template t = cfg.getTemplate("opensearchdescription.ftl");
PrintWriter writer = resp.getWriter();
t.process(ctx, writer);
writer.flush();
}
else {