掲示板

liferay-util:include

thumbnail
12年前 に Kamesh Sampath によって更新されました。

liferay-util:include

Regular Member 投稿: 158 参加年月日: 10/05/27 最新の投稿
Hi,

Can anyone tell me the differnce between <liferay-util:include> and jsp:include/<%@include%> ?

Can I use <liferay-util:include> in my custom portlet application ?, i see that the tag is not getting processed even though i give servletContext parameter for the tag emoticon

I guess I am missing something emoticon

Also whether its advisable to use the tag in the custom jsp of portlet application ?

Thanks

Kamesh
thumbnail
12年前 に jelmer kuperus によって更新されました。

RE: liferay-util:include

Liferay Legend 投稿: 1191 参加年月日: 10/03/10 最新の投稿
&lt;%@include%&gt;


Is the jsp include directive. The content of the file you are including is added at translation time. Eg. when the JSP file is compiled. So any code in the include is treated exactly as when had it been written inline in the jsp that does the include

&lt; jsp:include&gt;


Is the jsp include tag. The contents of the path you are including are added at request time. You can also parameterize the request that's made by nesting jsp:param elements in this tag. You can only include paths that are relative to your servlet context (eg. in your own war file)

<liferay-util:include></liferay-util:include>


Is the liferay inlude tag, afaik its kind of like jsp:include but let's you include files from other servlet contexts then your own, via it's servletContext attribute or portletId.


And then there's a bunch of others also related to including, you did not mention yet. Like <jsp:forward> and <c:import>. What you should use depends on the situation
thumbnail
12年前 に Kamesh Sampath によって更新されました。

RE: liferay-util:include

Regular Member 投稿: 158 参加年月日: 10/05/27 最新の投稿
thanks. but then when I use the <liferay-ui:include> to include a jsp file from my portlet plugin is not working, rather no error or jsp not inlcuded. I also tried putting down the servletContext="<%=this.getServletContext()%>" not sure what is the reason.

Is anyting am missing from this point of view ?
thumbnail
11年前 に Fuad Efendi によって更新されました。

RE: liferay-util:include

Regular Member 投稿: 180 参加年月日: 07/04/05 最新の投稿
This is super stupid, but make sure you have in portal-ext.properties

    theme.jsp.override.enabled=true


"include" tag checks this value in Liferay v.6.1.0 CE GA1...
thumbnail
11年前 に Kamesh Sampath によって更新されました。

RE: liferay-util:include

Regular Member 投稿: 158 参加年月日: 10/05/27 最新の投稿
thanks so much faud, we need this entry to make it work emoticon ... and actually it worked .
11年前 に Uday Reddy によって更新されました。

RE: liferay-util:include

New Member 投稿: 14 参加年月日: 11/11/08 最新の投稿
Hi

I'm using 6.0 EE version.

When i used <liferay-util:include> tag, Neighter executed the included page, nor no error on the page.

I also included the entry in portal-ext.properties file too.

Please help me in this.
thumbnail
11年前 に mohammad azaruddin によって更新されました。

RE: liferay-util:include

Expert 投稿: 492 参加年月日: 12/09/17 最新の投稿
Even i'm facing same problem.....can anyone help me please.....i include <%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> in jsp file also i enable theme.jsp.override.enabled=true in portal-ext file
Thank you
Regards
thumbnail
11年前 に Gnaniyar Zubair によって更新されました。

RE: liferay-util:include

Liferay Master 投稿: 722 参加年月日: 07/12/19 最新の投稿
Try this:


<liferay-util:include page="/next.jsp" servletContext="<%=this.getServletContext() %>">
11年前 に Roberto Díaz によって更新されました。

RE: liferay-util:include

Junior Member 投稿: 40 参加年月日: 08/06/26 最新の投稿
I have the same problem. I try with everything but it doesn't work. Anyone has any idea??

Thanks.

Gnaniyar Zubair:
Try this:


<liferay-util:include page="/next.jsp" servletContext="<%=this.getServletContext() %>">
thumbnail
11年前 に Fabian Funkel によって更新されました。

RE: liferay-util:include

New Member 投稿: 4 参加年月日: 13/03/07 最新の投稿
Adding that line:

theme.jsp.override.enabled=true


to the portal-ext.properties worked for me. (Liferay 6.1.20-EE-GA2)

You have to restart the server afterwards, obviously.
thumbnail
8年前 に Habib Zare によって更新されました。

RE: liferay-util:include

Junior Member 投稿: 58 参加年月日: 12/10/28 最新の投稿
I do that in liferay 6.2 but it is not working.
please help me.
thumbnail
7年前 に delang j によって更新されました。

RE: liferay-util:include

Expert 投稿: 252 参加年月日: 08/07/14 最新の投稿
Habib Zare:
I do that in liferay 6.2 but it is not working.
please help me.


please look at this link.
https://web.liferay.com/community/forums/-/message_boards/message/4315190