/**
* This servlet handles provisioning for the <drFeedsURL> which is the URL on the provisioning server used to
* create new feeds. It supports POST to create new feeds, and GET to support the Feeds Collection Query function.
/**
* This servlet handles provisioning for the <drFeedsURL> which is the URL on the provisioning server used to
* create new feeds. It supports POST to create new feeds, and GET to support the Feeds Collection Query function.
setIpAndFqdnForEelf("doDelete");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
String message = "DELETE not allowed for the drFeedsURL.";
setIpAndFqdnForEelf("doDelete");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
String message = "DELETE not allowed for the drFeedsURL.";
setIpAndFqdnForEelf("doGet");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
EventLogRecord elr = new EventLogRecord(req);
setIpAndFqdnForEelf("doGet");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
EventLogRecord elr = new EventLogRecord(req);
- super.doGet(req, resp);
+ try {
+ super.doGet(req, resp);
+ } catch (IOException ioe) {
+ eventlogger.error("IOException" + ioe.getMessage());
+ }
} else {
// send response
elr.setResult(HttpServletResponse.SC_OK);
eventlogger.info(elr);
resp.setStatus(HttpServletResponse.SC_OK);
resp.setContentType(FEEDFULL_CONTENT_TYPE);
} else {
// send response
elr.setResult(HttpServletResponse.SC_OK);
eventlogger.info(elr);
resp.setStatus(HttpServletResponse.SC_OK);
resp.setContentType(FEEDFULL_CONTENT_TYPE);
- resp.getOutputStream().print(feed.asJSONObject(true).toString());
+ try {
+ resp.getOutputStream().print(feed.asJSONObject(true).toString());
+ } catch (IOException ioe) {
+ eventlogger.error("IOException" + ioe.getMessage());
+ }
setIpAndFqdnForEelf("doPut");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
String message = "PUT not allowed for the drFeedsURL.";
setIpAndFqdnForEelf("doPut");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader(BEHALF_HEADER), getIdFromPath(req) + "");
String message = "PUT not allowed for the drFeedsURL.";
setIpAndFqdnForEelf("doPost");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF, req.getHeader(BEHALF_HEADER));
EventLogRecord elr = new EventLogRecord(req);
setIpAndFqdnForEelf("doPost");
eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF, req.getHeader(BEHALF_HEADER));
EventLogRecord elr = new EventLogRecord(req);
- super.doPost(req, resp);
+ try {
+ super.doPost(req, resp);
+ } catch (IOException ioe) {
+ eventlogger.error("IOException" + ioe.getMessage());
+ }
resp.setStatus(HttpServletResponse.SC_CREATED);
resp.setContentType(FEEDFULL_CONTENT_TYPE);
resp.setHeader("Location", feed.getLinks().getSelf());
resp.setStatus(HttpServletResponse.SC_CREATED);
resp.setContentType(FEEDFULL_CONTENT_TYPE);
resp.setHeader("Location", feed.getLinks().getSelf());
- resp.getOutputStream().print(feed.asLimitedJSONObject().toString());
+ try {
+ resp.getOutputStream().print(feed.asLimitedJSONObject().toString());
+ } catch (IOException ioe) {
+ eventlogger.error("IOException" + ioe.getMessage());
+ }
provisioningDataChanged();
} else {
// Something went wrong with the INSERT
elr.setResult(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
eventlogger.info(elr);
provisioningDataChanged();
} else {
// Something went wrong with the INSERT
elr.setResult(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
eventlogger.info(elr);