I have a portlet developed in Liferay platform in which I have added the logic to get the query parameter value from URL. I have got the site: http://localhost:8080/web/guest/example, Now this site is being called from the another external site that is not in Liferay with query parameter at end: http://localhost:8080/web/guest/example?value=test. In Liferay Portlet code I have applied the logic to get the Parameter value from the URL which is not working. It returns the "null" value:
HttpServletRequest httpReq = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(request));
String myValue = httpReq.getParameter("value");
System.out.println(myValue);
I tried this way too but get the same "null" value from Query parameter:
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
String myValue = httpRequest.getParameter("value");
System.out.println(myValue);
Any suggestion what I am doing wrong here or how can I get the query parameter value coming from external site?