This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Convert Http request to https in servlet/jsp ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Convert Http request to https in servlet/jsp ?" Watch "Convert Http request to https in servlet/jsp ?" New topic
Author

Convert Http request to https in servlet/jsp ?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
How can we convert http request to Https in servlet or jsp ?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19684
    
  20

Moving to our Servlets forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What do you mean by "convert"? An HTTP request is an HTTP request; nothing will make it into an HTTPS request. The response to the HTTP request could be a redirect to an equivalent HTTPS URL, though. Or you could instruct the web app to do that automatically.
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Prabhat Ranjan wrote:How can we convert http request to Https in servlet or jsp ?


Prabhat, if your intention is "How to enable SSL", then for tomcat it is done by enabling the port in server.xml , if I'm not wrong. But may be container specific which you need to go through documentation.


Regards
KumarRaja

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
yes you are correct. I mean to 'how to enable SSL' .

as we know https is secure connection.

Thanks
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Prabhat Ranjan wrote:yes you are correct. I mean to 'how to enable SSL' .

as we know https is secure connection.

Thanks


As I mentioned, please refer the container documentation. For Tomcat, it is uncommenting the section around HTTPS in server.xml and I think you need to restart the container after the change.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Please RTFM: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert Http request to https in servlet/jsp ?