sendError(response, t);
return;
}
Service s = null;
if ("WFS".equals(serviceRequest.getService())) {
s = serviceRequest.getWFS();
} else {
s = serviceRequest.getWMS();
}
try {
// execute request
LOGGER.finer("executing request");
serviceResponse.execute(serviceRequest);
LOGGER.finer("execution succeed");
} catch (ServiceException serviceException) {
LOGGER.warning("service exception while executing request: "
+ serviceRequest + "\ncause: " + serviceException.getMessage());
serviceResponse.abort(s);
sendError(response, serviceException);
return;
} catch (Throwable t) {
//we can safelly send errors here, since we have not touched response yet
serviceResponse.abort(s);
sendError(response, t);
return;
}
OutputStream strategyOuput = null;
//obtain the strategy output stream
try {
LOGGER.finest("getting strategy output");
strategyOuput = strategy.getDestination(response);
LOGGER.finer("strategy output is: "
+ strategyOuput.getClass().getName());
String mimeType = serviceResponse.getContentType(s.getGeoServer());
LOGGER.fine("mime type is: " + mimeType);
response.setContentType(mimeType);
String encoding = serviceResponse.getContentEncoding();