Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert Http request to https in servlet/jsp ?

 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we convert http request to Https in servlet or jsp ?
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Servlets forum.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you are correct. I mean to 'how to enable SSL' .

as we know https is secure connection.

Thanks
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1337
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic