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
  • 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? I dont think it has anything to do with Portal.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!