Checking if https is used

Hey experts,

  I need to check in the jsp page if ssl is used (i.e. the page is accessed via https), or not (accessed via normal http)...any help on how to do that??
LVL 3
mte01Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
suprapto45Connect With a Mentor Commented:
Hi,

Alternatively, you can use
<%= request.isSecure() %>
0
 
boonlengConnect With a Mentor Commented:
use the method getScheme() from HttpServletRequest. It will return http, https, or ftp.

<%=request.getScheme()%>
0
 
mte01Author Commented:
That did the trick!...thx for your help guys!
0
 
suprapto45Commented:
Glad I could help.

:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.