Forums de discussion
issue getting url parameter
Eric Soucy, modifié il y a 9 années.
issue getting url parameter
Junior Member Publications: 65 Date d'inscription: 21/01/14 Publications récentes
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, modifié il y a 9 années.
RE: issue getting url parameter
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
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, modifié il y a 9 années.
RE: issue getting url parameter
Junior Member Publications: 65 Date d'inscription: 21/01/14 Publications récentes
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, modifié il y a 9 années.
RE: issue getting url parameter
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
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, modifié il y a 9 années.
RE: issue getting url parameter
Junior Member Publications: 65 Date d'inscription: 21/01/14 Publications récentes
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, modifié il y a 9 années.
RE: issue getting url parameter
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
You can also try:
liferayFacesContext.getRequestQueryString();