How can I create an instance of WCMUsePojo in a servlet for a specific page?
<p>I am trying to create an instance of WCMUsePojo in a servlet. The implementing class is already used in sightly templates. I have tried code below and could not get it to work. Any ideas? Thanks.</p>

<pre><code>    @Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {

    try {
        Resource     resource = request.getResource().getResourceResolver().getResource
                ("/content/mynewsite/homepage");
        WCMUsePojo template = resource.adaptTo(BaseTemplate.class);
        template.getPageManager(); // Does not work
    } finally {
        log.error("Error processing servlet");
    }
}
</code></pre>