Author
Calling request. getRequestURL() .toString() on secure site returns http://....
Raj Aryan
Greenhorn
Joined: Apr 18, 2007
Posts: 7
posted Aug 29, 2007 17:31:00
0
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
Joined: Jan 10, 2002
Posts: 56207
"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 ]
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Raj Aryan
Greenhorn
Joined: Apr 18, 2007
Posts: 7
posted Aug 29, 2007 18:12:00
0
If you have a reply for the qn I asked, it would be great. Thanks Raj A
subject: Calling request. getRequestURL() .toString() on secure site returns http://....