'Tomcat 8 - Returning 404 Whereas Servlet is Returning Response
Tomcat is returning 404 errors as I can see in the access logs and URL is logged with 404 status code, however, the request reaches the servlet and output is written to the response with following statements:
response.getOutputStream().print(result);
response.getOutputStream().flush();
where result is JSON.
It doesn't happen all the time as sometimes the response is returned. My first guess was that there is something wrong with the JSON data, however, after adding some logs I have verified that the response is valid JSON in both cases when the response is returned with 200 or with 404.
I am wondering if its due to a bug in Tomcat maybe?
Has anyone else experienced such an issue?
Your help is highly appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
