D.T
D.T

Reputation: 537

Render PortletURL does not point to jsp file

I have the portlet with a form to add some fields and a link to the jsp showing the data table. This is file view.jsp:

<% 
  PortletURL showBooksURL = renderResponse.createRenderURL();
  showBooksURL.setParameter("showBook", "/html/addbook/showBook.jsp");
%> 

<aui form>

Click <a href = "<%=showBooksURL.toString()%>">here</a> to see the table.

When I click here the url in the browser point to showBook.jsp but the table doesn't show up, stay still with view.jsp. What Im doing wrong??

Upvotes: 0

Views: 127

Answers (1)

Pankaj Kathiriya
Pankaj Kathiriya

Reputation: 4210

Your parameter name should be jspPage(deprecated) or mvcPath as shown below.

showBooksURL.setParameter("jspPage", "/html/addbook/showBook.jsp"); or showBooksURL.setParameter("mvcPath", "/html/addbook/showBook.jsp");

You can verify code here, MVCPortlet.java

NOTE: Edited answer as per comment by @Olaf.

Upvotes: 1

Related Questions