aspose file tools
The moose likes Portals and Portlets and the fly likes Calling request. getRequestURL() .toString() on secure site returns http://.... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "Calling request. getRequestURL() .toString() on secure site returns http://...." Watch "Calling request. getRequestURL() .toString() on secure site returns http://...." New topic
Author

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

Raj Aryan
Greenhorn

Joined: Apr 18, 2007
Posts: 7
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
    
  13

"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
If you have a reply for the qn I asked, it would be great.

Thanks
Raj A
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Calling request. getRequestURL() .toString() on secure site returns http://....
 
Similar Threads
Changing the URL in a portal in WebSphere Application Server
Internet Explorer can not open the internet site operation aborted?????
How to access request parameters in Faces Portlets
how do redirect to my page ???
Calling request. getRequestURL(). toString() on secure site returns http://....