Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Servlets
getRequestURL() returning only http instead of https?
sudheshna Iyer
Ranch Hand
Posts: 71
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Even though we are accessing the site using
https://aaa.bbb.com/...
when I use
getRequestURL() inside the
servlet
, I am getting
http://aaa.bbb.com/....
I am not getting https.
What method do I need to use to get the correct protocol that I have used?
Also we have clusttered env in production? Will I encounter any problems when application goes to
production?
vishwanath nadimpally
Ranch Hand
Posts: 116
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I had a similar problem, so I used this :
request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getRequestURI() + "?" + request.getQueryString();
and this will do the same job as getRequestURL().
[ September 11, 2006: Message edited by: vishwanath nadimpally ]
[ September 11, 2006: Message edited by: vishwanath nadimpally ]
sudheshna Iyer
Ranch Hand
Posts: 71
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
But even when I use this, I am still getting http, instead of https.
Thank you for your help.
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
http url getting converted into https
how is HTTPS handled
servlet calling another servlet (SSL)
Grab the entire current URI
URL changes after redirect
More...