/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }
private String getTaglibUriFromTld(InputStream tldFileIn, String tldFileXmlSystemId) throws SAXException, IOException { TldParserForTaglibUriExtraction tldParser = new TldParserForTaglibUriExtraction(); parseXml(tldFileIn, tldFileXmlSystemId, tldParser); return tldParser.getTaglibUri(); }
@Override public JspWriter pushBody(Writer w) { return pushWriter(new JspWriterAdapter(w)); }
@Override public BodyContent pushBody() { return (BodyContent) pushWriter(new TagTransformModel.BodyContentImpl(getOut(), true)); }
@Override public JspWriter popBody() { popWriter(); return (JspWriter) getAttribute(OUT); }
/** * Adds the TLD location mapping from the TLD itself. */ private void addTldLocationFromTld(TldLocation tldLocation) throws IOException, SAXException { InputStream in = tldLocation.getInputStream(); try { addTldLocationFromTld(in, tldLocation); } finally { in.close(); } }
/** * Includes the specified path. The flush argument is ignored! */ public void include(String path, boolean flush) throws IOException, ServletException { super.include(path); } }
@Override public int getAttributesScope(String name) { if (getAttribute(name, PAGE_SCOPE) != null) return PAGE_SCOPE; if (getAttribute(name, REQUEST_SCOPE) != null) return REQUEST_SCOPE; if (getAttribute(name, SESSION_SCOPE) != null) return SESSION_SCOPE; if (getAttribute(name, APPLICATION_SCOPE) != null) return APPLICATION_SCOPE; return 0; }
@Override public String getSpecificationVersion() { return FreeMarkerJspFactory.this.getSpecificationVersion(); } };
/** * Sets the {@link ObjectWrapper} used when building the JSP tag library {@link TemplateHashModel}-s from the TLD-s. * Usually, it should be the same {@link ObjectWrapper} that will be used inside the templates. {@code null} value * is only supported for backward compatibility. For custom EL functions to be exposed, it must be non-{@code null} * and an {@code intanceof} {@link BeansWrapper} (like typically, a {@link DefaultObjectWrapper}). * * @since 2.3.22 */ public void setObjectWrapper(ObjectWrapper objectWrapper) { checkNotStarted(); this.objectWrapper = objectWrapper; }
/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }