To use Ajax in Liferay-MVC, you must create a resourceURL link and process it in the serveResource of the portlet class.
<portlet:resourceURL var="testURL"> <portlet:param name="pageAddress" value="/jspf/test.jspf" /> </portlet:resourceURL> <script> $("#test-button").click(function() { $("#test-table").load("<%= testURL %>"); }) </script>
then you must ensure the correct result in the serveResource method of your portlet class. in addition, you can get your parameter (pageAddress) with the resourceRequest Object
String pageAddress = resourceRequest.getParameter("pageAddress");
source share