This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to redirect from https to http

 
Jonh Smith
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have a servlet protected with <transport-guarantee>CONFIDENTIAL</transport-guarantee>, which correctly makes glassfish generate an automatic redirection response to the https port, when i use that servlet's mapped url in the browser. However, once there, any redirection to some unprotected resource keeps using the htpps protocol, not http and i don't want that. How can i do a response.sendRedirect(/*WHAT DO I PUT HERE?*/) that acomplishes this ? That is, if i use



the server response redirect location is for
https://localhost:8082/mywebapp/myurl,

instead of
http://localhost:/8081/mywebapp/myurl

Thank you
 
Rohan kanade
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Jonh Smith
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wasn't very happy with hard-wiring the domain name so googled around and made a small change to your suggestion:

Thank you very much for your help!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic