I have a componenet that has some dynamic content. And I don't want to dispatcher to cache this part. So inspired by http://www.slideshare.net/netceteragroup/dynamic-components-using-singlepageapplication-concepts-in-... (Page 4), This is what I did, under apps/myapp/dynamicComponent, I have a two files, one is dynamicComponent.jsp and the other is dynamicComponent.dynamic.jsp, So in dynamicComponent.dynamic.jsp page, I have some JSP code to render the dynamic content. and in dynamicComponenet.jsp, I am using SSI to include this like this
<div color="red">render this</div> <!--# include virtual="<%=currentNode.getPath().replace("jcr:content","_jcr_content")%>.dynamic.html" />
You can use the "recent requests" view in the OSGI webconsole to get insight what a request was actually doing. I don't see any obvious problem in your usecase, so you might find there some more information.
Thanks for the link. It is really helpful! I have managed to setup the SSI. But One thing confusing me is how do I differ the WCMMode in publish instance from dispatcher? This is what I wrote in the code, author and dispatcher are working fine, But the publish instance does not show. Any idea?