Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8007669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:54:26+00:00 2026-06-04T17:54:26+00:00

I have been trying to find a way of easily telling if a Java

  • 0

I have been trying to find a way of easily telling if a Java Server has SSL enabled from JSP to redirect a single page. My reasoning for this is that I only want to forward to SSL if it is enabled making it easy to test in our local dev systems without having to set up the certificates and then deploy to our release system and have the certificates just “work.”

I have looked at attempting to create a SslSocketFactory and seeing if it works without an exception being thrown, but this doesn’t appear to work as I thought. I do not particularly like this method however since I have to spend the time createing the factory to only throw it away. I’m really just looking for a public boolean isSslEnabled() method call that I can use.

Currently what we have is that the default state is to not use HTTPS, but when on the release system you can access the site via HTTPS. This isn’t ideal since a user could still access the site over HTTP and everything would then be sent in the clear. I’m also not looking to encrypt the whole server, just a single page if SSL is enabled.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:54:28+00:00Added an answer on June 4, 2026 at 5:54 pm

    Your Java code shouldnt be concerned whether SSL is enabled or not. Try to leave his to configuration only.

    If you have setup your SSL requirements inside your web.xml, then your developers can override their local web.xml for their local server requirements (eg eclipse).

    If your concerned about SSL for you per-production servers its best to create your own Certificate Authority and generate your own SSL certificates. This so that you can deploy the exact same EAR or WAR to pre-prod and production environments. You don’t want to fiddle you deployment per environment.

    Jboss SSL config

    Tomcat SSL config

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to find the correct way to sum 2 rows from
I have been trying to find a way of getting a windows batch file
I've been trying to find a way to do this but, have not found
I have been trying for the last week to find a way to make
I have been trying to find a way to get Clang working on Windows
I have been trying to find a way to do this query using a
I have been trying to find a way to incorporate something similar to Closure
I have been trying to find a way of watermarking all .jpg files in
I have been trying to find a way to set variables for one class
ok, i have been trying to find a way to choose and click for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.