Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

http https switch

 
Kevin Kilbane
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm new to SSL so this may be a basic question.

I want to implement SSL on the login part of my application only (running on Tomcat). I've managed to get this working but can't get the application to switch back to non-SSL mode i.e. to http after the login screen. I've tried a few different things and had a good search on the web but can't find a solution.

At present, the application's web.xml looks like this:



I only want SSL security on the logon.html page. This works i.e. when the user gets to http://localhost:8080/myApp/logon.html he is re-directed to port 8443 and prompted to accept the certificate. However, after a successful login, as the user navigates through the application, the protocol is still https and he is still connecting through port 8443. I want it so that after he goes through the login process that he is directed back to port 8080 and is using the http protocol.

My understanding is that it should be possible to do this. Any help appreciated.

Thnaks.
 
John Melton
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you're seeing is that your confidential guarantee is doing it's job. It's redirecting on login, but there's no "not confidential" guarantee. So, the servlet container understands from your web.xml that it must redirect to https when login.html is accessed, but there's nothing to tell it to go back. However, if your login.html form goes to say ... /LoginServlet, you could redirect from there to http:// ... landingpage.jsp or something like that, and that should do the trick. In other words you have to tell it to go back to http once, but after that, everything will be relative.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic