@Override public JspApplicationContext getJspApplicationContext( final ServletContext context) { if (Constants.IS_SECURITY_ENABLED) { return AccessController.doPrivileged( new PrivilegedAction<JspApplicationContext>() { @Override public JspApplicationContext run() { return JspApplicationContextImpl.getInstance(context); } }); } else { return JspApplicationContextImpl.getInstance(context); } }
@Override public JspApplicationContext getJspApplicationContext(final ServletContext context) { if (Constants.IS_SECURITY_ENABLED) { return AccessController.doPrivileged(new PrivilegedAction<JspApplicationContext>() { @Override public JspApplicationContext run() { return JspApplicationContextImpl.getInstance(context); } }); } else { return JspApplicationContextImpl.getInstance(context); } }
@Override public void setServletContext(ServletContext servletContext) { super.setServletContext(servletContext); DynamicELResolver elResolver = (DynamicELResolver) servletContext .getAttribute(EL_RESOLVER_KEY); if (elResolver == null) { elResolver = new DynamicELResolver(); JspFactory jspFactory = JspFactory.getDefaultFactory(); JspApplicationContext jspContext = jspFactory .getJspApplicationContext(servletContext); jspContext.addELResolver(elResolver); servletContext.setAttribute(EL_RESOLVER_KEY, elResolver); } elResolver.setBeanFactory(this.beanFactory); }
@Override public void contextInitialized(ServletContextEvent sce) { JspApplicationContext jspApplicationContext = JspFactory.getDefaultFactory().getJspApplicationContext( sce.getServletContext()); jspApplicationContext.addELResolver(new StrutsActionELResolver()); jspApplicationContext.addELResolver(new ExtendedAttributeELResolver()); jspApplicationContext.addELResolver(new MultimapELResolver()); }
/** * On Tomcat we need to sometimes force a class load to get our hands on the JspFactory */ private static void setJspELFactory(ServletContext startupObject, ELResolver resolver) { JspFactory factory = JspFactory.getDefaultFactory(); if (factory == null) { try { try { Class.forName("org.apache.jasper.servlet.JasperInitializer"); } catch (final Throwable th) { Class.forName("org.apache.jasper.compiler.JspRuntimeContext"); } factory = JspFactory.getDefaultFactory(); } catch (Exception e) { // ignore } } if (factory != null) { JspApplicationContext applicationCtx = factory.getJspApplicationContext(startupObject); applicationCtx.addELResolver(resolver); } else { logger.debug("Default JSPFactroy instance has not found. Skipping OWB JSP handling"); } }
public JspApplicationContext getJspApplicationContext(ServletContext context) { return JspApplicationContextImpl.getInstance(context); }
/** Creates an ExpressionFactory using the JspApplicationContext. */ protected ExpressionFactory getExpressionFactory() { ServletContext ctx = StripesFilter.getConfiguration().getServletContext(); JspApplicationContext jspCtx = JspFactory.getDefaultFactory().getJspApplicationContext(ctx); return jspCtx.getExpressionFactory(); }
public JspApplicationContext getJspApplicationContext (ServletContext context) { return JspApplicationContextImpl.findJspApplicationContext(context); }
@Override public JspApplicationContext getJspApplicationContext(ServletContext arg0) { throw new RuntimeException("not supported!"); }
/** * <p> * Obtain the <code>JspApplicationContext</code> instance that was associated * within the passed <code>ServletContext</code> for this web application. * </p> * * @param context the current web application's <code>ServletContext</code> * @return <code>JspApplicationContext</code> instance * @since 2.1 */ public abstract JspApplicationContext getJspApplicationContext(ServletContext context);