@Override public JspApplicationContext getJspApplicationContext(ServletContext ctx) { JspApplicationContext jspctx = (JspApplicationContext) ctx.getAttribute( JSPCTX_KEY); if (jspctx == null) { synchronized (ctx) { jspctx = (JspApplicationContext) ctx.getAttribute(JSPCTX_KEY); if (jspctx == null) { jspctx = new FreeMarkerJspApplicationContext(); ctx.setAttribute(JSPCTX_KEY, jspctx); } } } return jspctx; } }
@Override public ELContext getELContext() { if (elContext == null) { JspApplicationContext jspctx = JspFactory.getDefaultFactory().getJspApplicationContext(getServletContext()); if (jspctx instanceof FreeMarkerJspApplicationContext) { elContext = ((FreeMarkerJspApplicationContext) jspctx).createNewELContext(this); elContext.putContext(JspContext.class, this); } else { throw new UnsupportedOperationException( "Can not create an ELContext using a foreign JspApplicationContext (of class " + ClassUtil.getShortClassNameOfObject(jspctx) + ").\n" + "Hint: The cause of this is often that you are trying to use JSTL tags/functions in FTL. " + "In that case, know that that's not really suppored, and you are supposed to use FTL " + "constrcuts instead, like #list instead of JSTL's forEach, etc."); } } return elContext; } }
private static ExpressionFactory findExpressionFactoryImplementation() { ExpressionFactory ef = tryExpressionFactoryImplementation("com.sun"); if (ef == null) { ef = tryExpressionFactoryImplementation("org.apache"); if (ef == null) { LOG.warn("Could not find any implementation for " + ExpressionFactory.class.getName()); } } return ef; }
private static ExpressionFactory findExpressionFactoryImplementation() { ExpressionFactory ef = tryExpressionFactoryImplementation("com.sun"); if (ef == null) { ef = tryExpressionFactoryImplementation("org.apache"); if (ef == null) { LOG.warn("Could not find any implementation for " + ExpressionFactory.class.getName()); } } return ef; }
public JspApplicationContext getJspApplicationContext(ServletContext ctx) { JspApplicationContext jspctx = (JspApplicationContext)ctx.getAttribute( JSPCTX_KEY); if(jspctx == null) { synchronized(ctx) { jspctx = (JspApplicationContext)ctx.getAttribute(JSPCTX_KEY); if(jspctx == null) { jspctx = new FreeMarkerJspApplicationContext(); ctx.setAttribute(JSPCTX_KEY, jspctx); } } } return jspctx; } }
public ELContext getELContext() { if(elContext == null) { JspApplicationContext jspctx = JspFactory.getDefaultFactory().getJspApplicationContext(getServletContext()); if(jspctx instanceof FreeMarkerJspApplicationContext) { elContext = ((FreeMarkerJspApplicationContext)jspctx).createNewELContext(this); elContext.putContext(JspContext.class, this); } else { throw new UnsupportedOperationException( "Can not create an ELContext using a foreign JspApplicationContext\n" + "Consider dropping a private instance of JSP 2.1 API JAR file in\n" + "your WEB-INF/lib directory and then try again."); } } return elContext; } }
private static ExpressionFactory findExpressionFactoryImplementation() { ExpressionFactory ef = tryExpressionFactoryImplementation("com.sun"); if(ef == null) { ef = tryExpressionFactoryImplementation("org.apache"); if(ef == null) { logger.warn("Could not find any implementation for " + ExpressionFactory.class.getName()); } } return ef; }
@Override public JspApplicationContext getJspApplicationContext(ServletContext ctx) { JspApplicationContext jspctx = (JspApplicationContext) ctx.getAttribute( JSPCTX_KEY); if (jspctx == null) { synchronized (ctx) { jspctx = (JspApplicationContext) ctx.getAttribute(JSPCTX_KEY); if (jspctx == null) { jspctx = new FreeMarkerJspApplicationContext(); ctx.setAttribute(JSPCTX_KEY, jspctx); } } } return jspctx; } }
@Override public ELContext getELContext() { if (elContext == null) { JspApplicationContext jspctx = JspFactory.getDefaultFactory().getJspApplicationContext(getServletContext()); if (jspctx instanceof FreeMarkerJspApplicationContext) { elContext = ((FreeMarkerJspApplicationContext) jspctx).createNewELContext(this); elContext.putContext(JspContext.class, this); } else { throw new UnsupportedOperationException( "Can not create an ELContext using a foreign JspApplicationContext (of class " + ClassUtil.getShortClassNameOfObject(jspctx) + ").\n" + "Hint: The cause of this is often that you are trying to use JSTL tags/functions in FTL. " + "In that case, know that that's not really suppored, and you are supposed to use FTL " + "constrcuts instead, like #list instead of JSTL's forEach, etc."); } } return elContext; } }
private static ExpressionFactory findExpressionFactoryImplementation() { ExpressionFactory ef = tryExpressionFactoryImplementation("com.sun"); if (ef == null) { ef = tryExpressionFactoryImplementation("org.apache"); if (ef == null) { LOG.warn("Could not find any implementation for " + ExpressionFactory.class.getName()); } } return ef; }
@Override public JspApplicationContext getJspApplicationContext(ServletContext ctx) { JspApplicationContext jspctx = (JspApplicationContext) ctx.getAttribute( JSPCTX_KEY); if (jspctx == null) { synchronized (ctx) { jspctx = (JspApplicationContext) ctx.getAttribute(JSPCTX_KEY); if (jspctx == null) { jspctx = new FreeMarkerJspApplicationContext(); ctx.setAttribute(JSPCTX_KEY, jspctx); } } } return jspctx; } }
@Override public ELContext getELContext() { if (elContext == null) { JspApplicationContext jspctx = JspFactory.getDefaultFactory().getJspApplicationContext(getServletContext()); if (jspctx instanceof FreeMarkerJspApplicationContext) { elContext = ((FreeMarkerJspApplicationContext) jspctx).createNewELContext(this); elContext.putContext(JspContext.class, this); } else { throw new UnsupportedOperationException( "Can not create an ELContext using a foreign JspApplicationContext (of class " + ClassUtil.getShortClassNameOfObject(jspctx) + ").\n" + "Hint: The cause of this is often that you are trying to use JSTL tags/functions in FTL. " + "In that case, know that that's not really suppored, and you are supposed to use FTL " + "constrcuts instead, like #list instead of JSTL's forEach, etc."); } } return elContext; } }