Fórum

liferay-util:include is ignored

Shira Rand, modificado 11 Anos atrás.

liferay-util:include is ignored

New Member Postagens: 15 Data de Entrada: 13/02/13 Postagens Recentes
After reading this thread and trying every advise in it, I still can't get liferay-util:include to work.

I'm using Liferay 6.1.1-ce-ga2.
I added the following line to my portal-ext.properties file.
theme.jsp.override.enabled=true

My test code is this:
<jsp:include page="/html/portlet/test.jsp">
<jsp:param value="test" name="test" />
</jsp:include>
<liferay-util:include page="/html/portlet/test.jsp" servletcontext="<%=this.getServletContext()%>">
<liferay-util:param value="test" name="test" />
</liferay-util:include>

test.jsp looks like this:
&lt;%=request.getParameter("test")%&gt;

result is this:
null


The reason I also used jsp:include is to make sure I'm including the file right.
It works, but without really passing the parameter (as expected).

Any suggestions?

Thanks in advance!
Shira Rand, modificado 11 Anos atrás.

RE: liferay-util:include is ignored

New Member Postagens: 15 Data de Entrada: 13/02/13 Postagens Recentes
I managed to find the problem.
I had to add "docroot" to the include path in order for it to work.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: liferay-util:include is ignored

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
I had to add "docroot" to the include path in order for it to work.


Are you sure? When you deploy your portlet, is there a "docroot" directory? Normally, it's just a "html" directory.
Shira Rand, modificado 11 Anos atrás.

RE: liferay-util:include is ignored

New Member Postagens: 15 Data de Entrada: 13/02/13 Postagens Recentes
100% positive.
I was surprised myself.
The most annoying part about this is that you don't get any indication anywhere that the file is not found.