This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using https with specific application in tomcat  RSS feed

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to use https first time. I had gone through some tutorials, but can't find how to do following scenario.

I have few applications in my webapps folder of tomcat, out of which I want to use https for one application(say TestSSL) and other applications should use normal http.
I tried it and it's working, but at the same time the application(TsetSSL) is working with http also which I don't want. Is there a way to configure it somewhere that which application should which protocol, if not can anyone tell which is the best way to do this.


Thanks
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can require HTTPS to be used for specific web apps; that's set up in that web app's web.xml file. Search the servlet specification for "transport-guarantee".

Alternatively, you can check whether a request was made using HTTPS (using HttpServletRequest.isSecure), and if it was not, perform a client-side redirect to the HTTPS address.
 
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
take a look at this. This might help you.
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!