List of usage examples for javax.servlet.jsp JspFactory getDefaultFactory
public static JspFactory getDefaultFactory()
From source file:org.grails.gsp.jsp.GroovyPagesPageContext.java
public ELContext getELContext() { if (elContext == null) { JspApplicationContext jspContext = JspFactory.getDefaultFactory() .getJspApplicationContext(getServletContext()); if (jspContext instanceof GroovyPagesJspApplicationContext) { elContext = ((GroovyPagesJspApplicationContext) jspContext).createELContext(this); elContext.putContext(JspContext.class, this); } else {//from w w w .j a va 2s . c o m throw new IllegalStateException( "Unable to create ELContext for a JspApplicationContext. It must be an instance of [GroovyPagesJspApplicationContext] do not override JspFactory.setDefaultFactory()!"); } } return elContext; }
From source file:org.usergrid.standalone.Server.java
private void mapServlet(String cls, String mapping) { try {//w ww . ja v a 2s .c o m Servlet servlet = (Servlet) ClassLoaderUtil.load(cls); if (servlet != null) { ServletHandler handler = new ServletHandler(servlet); handler.setServletPath(mapping); httpServer.getServerConfiguration().addHttpHandler(handler, mapping); } } catch (Exception e) { logger.error("Unable to add JSP page: " + mapping); } logger.info("jsp: " + JspFactory.getDefaultFactory()); }