dcsimg

How can I tell if a connection to my servlet is via a secure channel (i.e., HTTPS instead of HTTP)?

John Mitchell

Use the servlet request's isSecure() or getAuthType() methods.