File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Switching btw 2 protocols

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • 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..
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic