Automatically redirect http To https Request

HTTP stands for HyperText Transport Protocol, which is just a fancy way of saying it’s a protocol (a language, in a manner of speaking) for information to be passed back and forth between web servers and clients.

You really don’t need to know what it all stands for; the important thing is the letter S which makes the difference between HTTP and HTTPS. The S (big surprise) stands for “Secure”.

There are many ways to achieve the redirection of all http request to https. Let us see one by one

1. we can configure it in deployment descriptor (web.xml). In the deployment descriptor we can mention every urls are secure.




HTTP Resources from Menu



/*





CONFIDENTIAL





The transport-guarantee element is what move the request to a secure location. It can have three values :

* NONE – this is the default unless explicitly stated
* INTEGRAL – data must be sent in a way that so that it cannot be changed during transmission
* CONFIDENTIAL – data must be sent in a way that it cannot be viewed during transmission (bascically, data is encrypted using SSL)

But when I discussed with Paramesh, he told me that this will lead to increase the load of the server because every url will redirect this.

2. We can configure this in server as well

3. We can set by using java script use this in your pages.


More Here


Courtesy:http://pjava.wordpress.com/2011/01/04/automatically-redirect-http-to-https-request/