Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2004

Tip: Looking for answers? Try searching our database.

Jetty and http to https redirect

Thread view: 
Forrest Samuels - 04 Dec 2004 22:30 GMT
I am working on an embedded web application using Jetty 4.2.10pre1.
The webapp has traditionally been run using just http on port 8082.
For the next release, we will be handling more sensitive passwords and
plan on using SSL/https instead. We are using the SunJsseListener for
our SSL support.

The problem we have is often users will still go to
http://127.0.0.1:8082 when they should go to https://127.0.0.1:8082.
Using http in IE causes an error and in Firefox it attempts to
download a file.

Is there a way to setup Jetty to recognize users are attempting to use
HTTP and redirect them to HTTPS?

It would be easier if we could use the standard port 443 but since
users may also be running a web server with SSL, we can't by default.
I am open to switching to a newer version of Jetty if need be.

Thanks for the help.
Steve Sobol - 05 Dec 2004 00:17 GMT
> Is there a way to setup Jetty to recognize users are attempting to use
> HTTP and redirect them to HTTPS?

You should be able to set up a standard security constraint that forces SSL,
although I don't know if it'll automatically redirect them.

Barring that, you could set up a servlet that redirects everyone going to http
on port 8082 to https on port 443.

Neither of these solutions are Jetty-specific, but they should both work fine.

Signature

JustThe.net Internet & New Media Services, http://JustThe.net/
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / sjsobol@JustThe.net
PGP Key available from your friendly local key server (0xE3AE35ED)
Apple Valley, California     Nothing scares me anymore. I have three kids.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.