Check JSON request or not
<p>How do I check that the request done to the servlet is JSON request or not?</p>

<p>If the request is JSON than the response will be in JSON. Otherwise it will be a web request and response will be a web response.</p>