I\'m building a very simple REST API using Jersey, and I\'ve got a warning in my log files that I\'m not sure about.
WARNING: A servlet POST request,
This message is meant to warn developers about the fact that the request entity body has been consumed, thus any other attempts to read the message body will fail.
It is safe to ignore the message or filter it out from the logs:
java.util.logging.Logger jerseyLogger =
java.util.logging.Logger.getLogger(WebComponent.class.getName());
jerseyLogger.setFilter(new Filter() {
@Override
public boolean isLoggable(LogRecord record) {
boolean isLoggable = true;
if (record.getMessage().contains("Only resource methods using @FormParam")) {
isLoggable = false;
}
return isLoggable;
}
});