• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

http https switch

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Evildoers! Eat my justice! And this tiny ad's justice too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic