-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: liferay-faces-2.1.3-ga4, liferay-faces-3.0.3-legacy-ga4, liferay-faces-3.0.3-ga4, liferay-faces-3.1.3-ga4
-
Component/s: Liferay Faces Bridge Impl / Demos / Tests
-
Labels:None
-
Environment:IBM Websphere Portal 8.0
Oracle JSF 2.1.20
Class com.liferay.faces.bridge.context.url.BridgeResourceURLImpl can not correct encode javax.faces.resource=jsf.js script inserted to <h:head/> section by JSF implementation. It causes portlet container exception.
Resource url for Websphere Portal is relative to current portal page and it looks like pw/Z7_MP8E1O42IOJ5C0IN44PTV91084/res/c=cacheLevelPage/p=ln=javax.faces/p=javax.faces.resource=jsf.js/p=stage=Development/=/
Class BridgeResourceURLImpl tries to determine how to encode this URL and processes it as "external URL". This takes place because BridgeResourceURLImpl checks the URL for "external resource" before checking for faces resource.
So I guess it would be good idea to add "faces resource" checking first.
Here is pice of original code for method
BridgeResourceURLImpl#toBaseURL()
...
// Otherwise, if the URL is external, then return an encoded BaseURL string representation of the URL.
else if (isExternal())
// Otherwise, if the URL is identified by the ResourceHandler as a JSF2 resource URL, then
else if (isFaces2ResourceURL()) {
// If the URL has already been encoded, then return the URL string unmodified.
if (isEncodedFaces2ResourceURL())
// Otherwise, return a ResourceURL that can retrieve the JSF2 resource.
else
}
...