Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: serveResource of MVCPortlet is not fetching formdata.
For ajax call I am sending two parameters a form data.
In the serveResource I am getting the formdata like :
ParamUtil.getBoolean(request, "cookieConsent")
ParamUtil.getLong(request, "cookieConsentDate")
I am receiving only null value. Thanks in advance.
Hi,
You may need to prepend the parameter name with PortletNamespace before submitting to fetch it in ParamUtil.
//Using taglib
<portlet:namespace/>cookieConsent=false
//Using Scriptlet
<%=renderResponse.getNamespace()%>
or
directly get it from Request Object
request.getParameter("cookieConsent");
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™