@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; } }
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; } }
@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; } }
@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; } }