RE: renderUrl cannot be resolved to a variable

Jamie Sammons, modified 3 Years ago. New Member Posts: 4 Join Date: 6/18/22 Recent Posts

I have this code where i have to render muy url. In code it is showing an error

 

<%@ include file="init.jsp" %>

<p>
    <b><liferay-ui:message key="first.caption"/></b>
</p>

<portlet:actionURL var="namOfUrl" name="methodname">

<portlet:param name="paramname" value="value"/>

</portlet:actionURL>

<portlet:renderURL var="renderUrl">

<portlet:param name="mvcpath" value="/First.jsp"/>

<portlet:param name="paramname" value="value"/>

</portlet:renderURL>

<a href="<%=renderUrl%>">FindView</a>

 

 

thumbnail
Jamie Sammons, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

Is this in Eclipse? I've had problems with its JSP editor for a long time - especially in plugins that might be incomplete.

Sometimes it's easy to fix by being more specific in specifying where "init.jsp" is expected, e.g. through changing it to "./init.jsp" or "/init.jsp"

The root cause for the error that's signalled is that the editor somehow doesn't know the portlet tld, which is included in init.jsp - thus helping the editor resolving its default lookup path might help.

Olaf Kock, modified 3 Years ago. New Member Posts: 4 Join Date: 6/18/22 Recent Posts

Hi Olaf

This is in Liferay IDE. I'll look into it. Thank you for helping.