/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }
/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }
TaglibFactory taglibFactory = new TaglibFactory(servletContext);
/** * Invoked on startup. Looks for a single FreeMarkerConfig bean to * find the relevant Configuration for this factory. * <p>Checks that the template for the default Locale can be found: * FreeMarker will check non-Locale-specific templates if a * locale-specific one is not found. * @see freemarker.cache.TemplateCache#getTemplate */ @Override protected void initServletContext(ServletContext servletContext) throws BeansException { if (getConfiguration() != null) { this.taglibFactory = new TaglibFactory(servletContext); } else { FreeMarkerConfig config = autodetectConfiguration(); setConfiguration(config.getConfiguration()); this.taglibFactory = config.getTaglibFactory(); } GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig()); } catch (ServletException ex) { throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex); } this.servletContextHashModel = new ServletContextHashModel(servlet, getObjectWrapper()); }
/** * Invoked on startup. Looks for a single FreeMarkerConfig bean to * find the relevant Configuration for this factory. * <p>Checks that the template for the default Locale can be found: * FreeMarker will check non-Locale-specific templates if a * locale-specific one is not found. * @see freemarker.cache.TemplateCache#getTemplate */ @Override protected void initServletContext(ServletContext servletContext) throws BeansException { if (getConfiguration() != null) { this.taglibFactory = new TaglibFactory(servletContext); } else { FreeMarkerConfig config = autodetectConfiguration(); setConfiguration(config.getConfiguration()); this.taglibFactory = config.getTaglibFactory(); } GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig()); } catch (ServletException ex) { throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex); } this.servletContextHashModel = new ServletContextHashModel(servlet, getObjectWrapper()); }
/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }
/** * Initialize the {@link TaglibFactory} for the given ServletContext. */ @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); }
/** * <p>Instantiates and returns a new <code>TagLibFactory</code> using the <code>ServletContext</code> supplied by the * Spring Framework because this class implements the <code>ServetContextAware</code> interface. * @return A new instance of a <code>TagLibFactory</code> */ public TaglibFactory getTabLibFactory() { TaglibFactory tagLibFactory = new TaglibFactory(servletContext); return tagLibFactory; }
/** * <p>Instantiates and returns a new <code>TagLibFactory</code> using the <code>ServletContext</code> supplied by the * Spring Framework because this class implements the <code>ServetContextAware</code> interface. * @return A new instance of a <code>TagLibFactory</code> */ public TaglibFactory getTabLibFactory() { TaglibFactory tagLibFactory = new TaglibFactory(servletContext); return tagLibFactory; }
protected TaglibFactory checkTaglibFactory(ServletContext servletContext) { if (taglibFactory == null) { taglibFactory = new TaglibFactory(new FreemarkerServletContextWrapper(servletContext)); } return taglibFactory; }
TaglibFactory JspTaglibs = new TaglibFactory(servletContext); root.put("JspTaglibs", JspTaglibs);
servletContextModel = new ServletContextHashModel(servlet, wrapper); servletContext.setAttribute(ATTR_APPLICATION_MODEL, servletContextModel); TaglibFactory taglibs = new TaglibFactory(servletContext); servletContext.setAttribute(ATTR_JSP_TAGLIBS_MODEL, taglibs);
TaglibFactory taglibs = new TaglibFactory(virtualContext); servletContext.setAttribute(ATTR_JSP_TAGLIBS_MODEL, taglibs);
servletContextModel = new ServletContextHashModel(servlet, wrapper); servletContext.setAttribute(ATTR_APPLICATION_MODEL, servletContextModel); TaglibFactory taglibs = new TaglibFactory(servletContext); servletContext.setAttribute(ATTR_JSP_TAGLIBS_MODEL, taglibs);
TaglibFactory taglibFactory = new TaglibFactory(servletContext);
TaglibFactory taglibFactory = new TaglibFactory(servletContext);
ATTR_APPLICATION_MODEL, servletContextModel); TaglibFactory taglibs = new TaglibFactory(servletContext); servletContext.setAttribute( ATTR_JSP_TAGLIBS_MODEL,
/** * JSP taglib support */ public void loadJspTaglib(GenericServlet servlet) { if (rendering instanceof FreemarkerEngine) { FreemarkerEngine fm = (FreemarkerEngine) rendering; ServletContextHashModel servletContextModel = new ServletContextHashModel(servlet, fm.getObjectWrapper()); fm.setSharedVariable("Application", servletContextModel); fm.setSharedVariable("__FreeMarkerServlet.Application__", servletContextModel); fm.setSharedVariable("Application", servletContextModel); fm.setSharedVariable("__FreeMarkerServlet.Application__", servletContextModel); fm.setSharedVariable("JspTaglibs", new TaglibFactory(servlet.getServletContext())); } }
/** * Invoked on startup. Looks for a single FreeMarkerConfig bean to * find the relevant Configuration for this factory. * <p>Checks that the template for the default Locale can be found: * FreeMarker will check non-Locale-specific templates if a * locale-specific one is not found. * @see freemarker.cache.TemplateCache#getTemplate */ @Override protected void initServletContext(ServletContext servletContext) throws BeansException { if (getConfiguration() != null) { this.taglibFactory = new TaglibFactory(servletContext); } else { FreeMarkerConfig config = autodetectConfiguration(); setConfiguration(config.getConfiguration()); this.taglibFactory = config.getTaglibFactory(); } GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig()); } catch (ServletException ex) { throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex); } this.servletContextHashModel = new ServletContextHashModel(servlet, getObjectWrapper()); }
/** * Invoked on startup. Looks for a single FreeMarkerConfig bean to * find the relevant Configuration for this factory. * <p>Checks that the template for the default Locale can be found: * FreeMarker will check non-Locale-specific templates if a * locale-specific one is not found. * @see freemarker.cache.TemplateCache#getTemplate */ @Override protected void initServletContext(ServletContext servletContext) throws BeansException { if (getConfiguration() != null) { this.taglibFactory = new TaglibFactory(servletContext); } else { FreeMarkerConfig config = autodetectConfiguration(); setConfiguration(config.getConfiguration()); this.taglibFactory = config.getTaglibFactory(); } GenericServlet servlet = new GenericServletAdapter(); try { servlet.init(new DelegatingServletConfig()); } catch (ServletException ex) { throw new BeanInstanceException("Initialization of GenericServlet adapter failed", ex); } this.servletContextHashModel = new ServletContextHashModel(servlet, getObjectWrapper()); }