portlet:renderURL not working

liferay, liferay-6, portlet

Solution

Can you try the following code in your page1.jsp and see if it works:

<portlet:renderURL var="clickRenderURL">
    <portlet:param name="jspPage" value="/WEB-INF/view/page2.jsp" />
</portlet:renderURL>

<a href="<%=clickRenderURL %>">Click here</a>

If it does than may be this is the issue with quotes ("").

If it does not then can you provide more details like which portlet are you extending MVCPortlet, etc.

Problem

I am working on liferay 6 Portlet development. I am new to it. I need to keep a Hyperlink to another jsp this way as shown. ``` <a href="<portlet:renderURL> <portlet:param name="jspPage" value="/WEB-INF/view/page2.jsp" /> </portlet:renderURL>"> </a> ``` I have another JSP called page2.jsp , but this isn't working (Means when i click on the hyper link , it aain displays the First JSP only But this isn't working This is my page1.jsp ``` <%@ taglib prefix="s" uri="/struts-tags" %> <s:form action="helloForm" method="POST" theme="simple"> Enter Your Name:<s:textfield name="namer" value="%{name}" required="true"/> <s:submit/> </s:form> <a href="<portlet:renderURL> <portlet:param name="jspPage" value="/WEB-INF/view/page2.jsp" /> </portlet:renderURL>"> </a> ``` ========= This is pag2.jsp ``` <html> <head> </head> <body> <h1>Hi </h1> </body> </html> ```

Original source