I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is
Try this:
In your JSP ->
A.one('.myLink').on('click', function () {
window.location.href = '${myRenderURL}';
});
Then in your java portlet class ->
@Override
public void doView(RenderRequest request, RenderResponse response)
throws IOException, PortletException {
String jspName = ParamUtil.getString("jspName", "view.jsp");
include("path/to/your/jsp/" + jspName, request, response);
}
One last note: Starting with Liferay 6.2, portlet urls created with javascript methods mentioned in the OP above will
Also see the Liferay Documentation on this.