• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling request. getRequestURL() .toString() on secure site returns http://....  RSS feed

 
Raj Aryan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working in Portal 5.1 and using a secure site. The code that I have written in my JSP is to get the server part of the URL.

String completeUrl = request.getRequestURL().toString();
int indexOfWps = completeUrl.indexOf("/wps/");
String serverPath = completeUrl.substring(0, indexOfWps);

Say if the url is: https://test-portal.com/wps/myportal/.... etc
I get back
http://test-portal.com
instead of
https://test-portal.com

Anyone has any idea?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65899
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Raj A", you have previously been warned on multiple occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional, and this is your final warning. Adjust your display name to comply with the required standards prior to your next post.

Failure to comply will result in the removal of your account.

bear
JavaRanch Sheriff
[ August 29, 2007: Message edited by: Bear Bibeault ]
 
Raj Aryan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a reply for the qn I asked, it would be great.

Thanks
Raj A
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!