/** * Method to check whether a page exists in the Tridion Broker. * * @param url the Url to check * @param publicationId the publication Id * @return boolean indicating the page is present */ @Override public Boolean isPagePublished(String url, int publicationId) { LOG.debug("Enter isPagePublished with url: {} and publicationId: {}", url, publicationId); try { return pageProvider.checkPageExists(url, publicationId); } catch (ItemNotFoundException | SerializationException e) { LOG.error(e.getLocalizedMessage(), e); } return false; }
@Override public void doTag() throws JspException, IOException { final Page page = (Page) getJspContext().getAttribute(Constants.PAGE_MODEL_KEY, PageContext.REQUEST_SCOPE); if (page != null) { final PageContext pageContext = (PageContext) getJspContext(); final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); final HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); String renderedCp = ""; try { renderedCp = RenderUtils.renderDynamicComponentPresentation(request, response, componentURI, templateURI, viewName); } catch (FactoryException e) { LOG.error(e.getLocalizedMessage(), e); } pageContext.getOut().write(renderedCp); } else { LOG.warn("The JSP context does not contain an attribute called '" + Constants.PAGE_MODEL_KEY + "'."); } }
out = RenderUtils.renderComponentPresentations(request, response, filteredComponentPresentations); } catch (FactoryException e) { LOG.error(e.getLocalizedMessage(), e);