I've been trying to make a conditional include in a jsf page just like:
<%
if ( condition ) {
%>
<h:form>
<jsp:include page="page1.jsp"/>
</h:form>
<%
}
%>
When
condition is true everythings is ok. However when
condition is false I always get an exception like:
javax.servlet.ServletException: cannot add component with id 'p_1' and path :
{Component-Path : [Class: com.exadel.htmLib.components.UIP,Id: p_1]}
to its parent component. This might be a problem due to duplicate ids.
I guess that the component tree just cannot be rebuilt successfully when the page is not included.
Any ideas?
Thanks