// If an error occurs the servlet engine will use the output stream to write the error message.
// The message can't be sent back to the browser if the getWriter method has already been called.
// So use the output stream from the response and convert to a writer.
Writer responseWriter = new OutputStreamWriter( response.getOutputStream() );
GeoJsonWriter featureWriter = new GeoJsonWriter( responseWriter );
featureWriter.feature();
featureWriter.key( "properties" );
featureWriter.value( (Object)null );
featureWriter.key( "geometry" );
featureWriter.value( (Object)null );
featureWriter.key( "bbox" );
featureWriter.value( bounds );
featureWriter.endFeature();
responseWriter.flush();
}
catch (Exception e)
{