Foren
issue getting url parameter
Eric Soucy, geändert vor 9 Jahren.
issue getting url parameter
Junior Member Beiträge: 65 Beitrittsdatum: 21.01.14 Neueste Beiträge
Hello,
My JSF portlet is being called by an external app (using redirection).
This external application adds extra query parameter with a second question mark "?"
for example it does a redirect to:
In my managedbean, I am having a hard time retrieving the confirmationNumber from the url.
Is there a way to do that ?
Thank you
My JSF portlet is being called by an external app (using redirection).
This external application adds extra query parameter with a second question mark "?"
for example it does a redirect to:
https://localhost:8443/web/test/test-portlet?p_p_id=portlettestnetbanx_WAR_portlettestnetbanx&_portlettestnetbanx_WAR_portlettestnetbanx__jsfBridgeViewId=%2Fviews%2Fview3.xhtml?confirmationNumber=266927410&
In my managedbean, I am having a hard time retrieving the confirmationNumber from the url.
Is there a way to do that ?
Thank you
Neil Griffin, geändert vor 9 Jahren.
RE: issue getting url parameter
Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Eric,
Is it possible to fix the external application so that it appends an ampersand rather than a question-mark?
Kind Regards,
Neil
Is it possible to fix the external application so that it appends an ampersand rather than a question-mark?
Kind Regards,
Neil
Eric Soucy, geändert vor 9 Jahren.
RE: issue getting url parameter
Junior Member Beiträge: 65 Beitrittsdatum: 21.01.14 Neueste Beiträge
Hi Neil, unfortunately that would be very hard.
Is there a way to get the complete url? I could always parse it myself afterwards
to get the confirmationNumber.
Thanks
Is there a way to get the complete url? I could always parse it myself afterwards
to get the confirmationNumber.
Thanks
Neil Griffin, geändert vor 9 Jahren.
RE: issue getting url parameter
Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
You can try this:
Or you can just call:
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
ThemeDisplay themeDisplay = (ThemeDisplay) externalContext.requestParameterMap(WebKeys.THEME_DISPLAY);
String portalURL = themeDisplay.getPortalURL();
Or you can just call:
LiferayFacesContext.getInstance().getThemeDisplay().getPortalURL();
Eric Soucy, geändert vor 9 Jahren.
RE: issue getting url parameter
Junior Member Beiträge: 65 Beitrittsdatum: 21.01.14 Neueste Beiträge
Hi Neil,
I tried your suggestions, I get the URL up to the second "?" (https://localhost:8443/web/test/test-portlet?p_p_id=portlettestnetbanx_WAR_portlettestnetbanx&_portlettestnetbanx_WAR_portlettestnetbanx__jsfBridgeViewId=%2Fviews%2Fview3.xhtml)
but I don't get the last part ?confirmationNumber=1234
Do you have another suggestion ?
Thanks so much for your help.
I tried your suggestions, I get the URL up to the second "?" (https://localhost:8443/web/test/test-portlet?p_p_id=portlettestnetbanx_WAR_portlettestnetbanx&_portlettestnetbanx_WAR_portlettestnetbanx__jsfBridgeViewId=%2Fviews%2Fview3.xhtml)
but I don't get the last part ?confirmationNumber=1234
Do you have another suggestion ?
Thanks so much for your help.
Neil Griffin, geändert vor 9 Jahren.
RE: issue getting url parameter
Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
You can also try:
liferayFacesContext.getRequestQueryString();