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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 235
Primefaces: How to display a variable that can take only 'Y' or 'N' or a boolean value. 2 126
servlet example 17 59
jsp error 6 48
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In a recent question ( here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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