title: How can I know if the request to the servlet was executed using HTTP or HTTPS?
body: <p>I wrote a servlet in Java and I would like to know if the request to that servlet was executed using HTTP or HTTPS.</p>
  
  <p>I thought I can use <code>request.getProtocol()</code> but it returns HTTP/1.1 on both methods.</p>
  
  <p>Any ideas?</p>