File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63529

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

[Asking smart questions] [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
I agree. Here's the link:
subject: http to https
jQuery in Action, 3rd edition