Checking if https is used

Posted on 2006-10-24
Last Modified: 2010-04-01
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??
Question by:mte01
  • 2
LVL 14

Assisted Solution

boonleng earned 130 total points
ID: 17801422
use the method getScheme() from HttpServletRequest. It will return http, https, or ftp.

LVL 16

Accepted Solution

suprapto45 earned 250 total points
ID: 17801716

Alternatively, you can use
<%= request.isSecure() %>

Author Comment

ID: 17821217
That did the trick!...thx for your help guys!
LVL 16

Expert Comment

ID: 17825721
Glad I could help.


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now