I am going to create a component which needs to reuse the existing component 3 times. In my component's JSP file I added following but getting blank page when creating a template for my component and then creating a page for that template.
<%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %><%
%>
haha
<cq:include path="test" resourceType="/apps/help/components/relatedlinks" />
<cq:include path="test1" resourceType="/apps/help/components/relatedlinks" />
<cq:include path="test2" resourceType="/apps/help/components/relatedlinks" />
Does it work when you only add 1 component and then break the moment you add a second component reference? If so, that is a good indication that there is something in your component code that is not self-contained. For example, maybe the component adds an attribute to the Request context instead of just the JSP context, causing the second instance to throw an exception. The error log will be your friend in this case--it should pinpoint what the exception is. Things to check for include:
The JSP code you put in this example otherwise looks fine to me, so really it would require posting the component code to give a more detailed answer to a specific root cause.