How can I create an instance of WCMUsePojo in a servlet for a specific page?
问题 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. @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);