Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to include a jsp using a JSP tag
Hi,
I am having problems when I try to include a JSF portlet inside another portlet using either jsp:include or pageContext.include.
<%@include file="policySelection.jsp"%> but the following does not work
<include page="poilcySelection.jsp"/> or if I use
pageContext.incldue("policySelection.jsp") inside the jsp tag handler. Note that policySelection.jsp is a jsf page.
Please Suggest
I am having problems when I try to include a JSF portlet inside another portlet using either jsp:include or pageContext.include.
<%@include file="policySelection.jsp"%> but the following does not work
<include page="poilcySelection.jsp"/> or if I use
pageContext.incldue("policySelection.jsp") inside the jsp tag handler. Note that policySelection.jsp is a jsf page.
Please Suggest
hi,
Did you try with
it is working for me.
Regards,
Abhijit Gurav
Did you try with
<jsp:include page="/page_name.jsp" />it is working for me.
Regards,
Abhijit Gurav
Hi,
You need to put <jsp:include page="jspPageToInclude.jsp"/> in </f:subview> tag.
<f:view>
<f:subview id="subpage">
<jsp:include page="jspPageToInclude.jsp"/>
</f:subview>
</f:view>
or you can also use JSTL <c:import>
Note:-
all JSF component custom actions in included pages must be nested inside the <f:subview> custom action from the JSF Core Tag Library (which is itself nested inside the <f:view> custom action). The <f:subview> action itself may be present in the including page (i.e. with the <jsp:include> or <c:import> action nested inside it), or in the included page.
Cheers!
Team Cignex
You need to put <jsp:include page="jspPageToInclude.jsp"/> in </f:subview> tag.
<f:view>
<f:subview id="subpage">
<jsp:include page="jspPageToInclude.jsp"/>
</f:subview>
</f:view>
or you can also use JSTL <c:import>
Note:-
all JSF component custom actions in included pages must be nested inside the <f:subview> custom action from the JSF Core Tag Library (which is itself nested inside the <f:view> custom action). The <f:subview> action itself may be present in the including page (i.e. with the <jsp:include> or <c:import> action nested inside it), or in the included page.
Cheers!
Team Cignex