File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Redirect http to https Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Redirect http to https" Watch "Redirect http to https" New topic

Redirect http to https

Satish Kulkarni
Ranch Hand

Joined: Jul 19, 2003
Posts: 60
I am using SunOne webserver 6.1.
When the user enters http://<myurl> i want them to be redirected to https://<myurl>
What are the changes I have to make in my web server configuration files.

danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
I never used Sun One.

Based on the experience I got from other application servers, you should add a secured Connector with listens "https" protocol.

In Tomcat, it looks like

<Connector acceptCount="100" disableUploadTimeout="true" enableLookups="true" maxProcessors="75" port="8443" scheme="https" secure="true" sslProtocol="TLS">

Shyama Menon

Joined: Jun 10, 2004
Posts: 3
If u are using windows, then u can do it from the gui. You can forward requests using the URL forward option under content management.
I agree. Here's the link:
subject: Redirect http to https