• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Switching btw 2 protocols

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
I know how to configure tomcat to use https protocol.
now, I want to develop the following application:
the user must type the following url to visit the application:
http://localhost:8080/context/index.jsp
inside this page, I have the following link:
<a href="http://localhost:8443/context/register.jsp">Register</a>
the problem is :
how to configure tomcat to use https protocol (only) when the user clicks on register link (in this case , the port 8443).
I can make tomcat use https, but the problem is , it uses it for the whole
application ( I mean, https://localhost:8843/context/index.jsp)
which it is not the case in the real applications.
Any help is very appreciated..
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you configuring tomcat to 'use https' by setting transport-guarantee in web.xml for '/'?


That would result in requiring https for the 'whole' site, but you should be able to configure it on page-by-page basis.

Also, there's a much "simpler" way to do this, by simply modifying the link that takes you to the registration page. Make it :
<a href="https://localhost:8443/context/register.jsp">Register</a>

Then when that page is done, it can sendRedirect back to regular http:

Also:
http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl_p.html
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic