This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Security and the fly likes http to https Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "http to https" Watch "http to https" New topic

http to https

sdeepa redd

Joined: Jun 16, 2009
Posts: 5

We use Jboss and Apache. Right now we use http protocol.
If we want to move to https what changes are needed? Is it configurable on the server or
does it require any code related changes in our application.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63227

"deepadeepa deepa", please check your private messages for an important administrative matter.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Liviu Grigorescu

Joined: May 18, 2009
Posts: 2
In the simplest setup you just have to configure the server.

Create keystore to hold the self signed certificate used by the server to perform SSL connections.
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore c:\jboss\server\default\conf\server.keystore

Add the following connector to c:\jboss\server\default\deploy\jboss-web.deployer\server.xml in addition to the existing one.

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"

'keystorepass' must be replaced with the password asked by keytool.

Restart jboss.

You should now be ready to access your web app from https://your_app in addtion to http://your_app.

additional info at
Have you checked out Aspose?
subject: http to https
jQuery in Action, 3rd edition