Details
-
Type:
Bug
-
Status:
Verified
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 6.0.6 GA, 6.1.0 CE RC1
-
Fix Version/s: None
-
Component/s: Tools, Tools > Portal Taglibs
-
Labels:None
-
Environment:Tomcat 6.0.32, Windows 7, SQL 2008, MVCPortlet
-
Fix Priority:3
-
Liferay Contributor's Agreement:Accept
-
Similar Issues:
Description
Defining a renderURL thus:
<liferay-portlet:renderURL varImpl="myURL" secure="true">
<liferay-portlet:param name="jspPage" value="/myPage.jsp"/>
</liferay-portlet:renderURL>
Were the server is currently running in an unsecure fashion, i.e. http://mydomain.com:8080/
Incorrectly results in a URL of https://mydomain.com:8080/...
Note the port number, this should have been changed to 8443 for my instance.
The issue occurs because in PortletURLImpl in the generateToString method, there is the following code at line 750:
if (layout != null) {
_layoutFriendlyURL = GetterUtil.getString(
PortalUtil.getLayoutFriendlyURL(layout, themeDisplay));
if (_secure)
{ _layoutFriendlyURL = HttpUtil.protocolize( _layoutFriendlyURL, true); }}
HttpUtil.protocolize does not update the port number to the correct port.

The problem is how to retrieve this port number in a generic (Tomcat/Jboss) way
http://stackoverflow.com/questions/1233871/tomcat-how-to-get-the-secure-port-number-in-java