Examples of addELContextListener()


Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            applicationCtx.addELResolver(resolver);

            logger.debug("Application is configured as JSP. Adding EL Listener.");

            //Adding listener
            applicationCtx.addELContextListener(elContextListener);
        }

        // Add BeanManager to the 'javax.enterprise.inject.spi.BeanManager' servlet context attribute
        ServletContext servletContext = (ServletContext)(startupObject);
        servletContext.setAttribute(BeanManager.class.getName(), getBeanManager());
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            {
                log.debug("jspfactory = " + jspFactory);
            }
            JspApplicationContext appCtx = jspFactory.getJspApplicationContext(servletContext);

            appCtx.addELContextListener(new FacesELContextListener());

            RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext);
            runtimeConfig.setExpressionFactory(appCtx.getExpressionFactory());

            ApplicationImpl.setInitializingRuntimeConfig(runtimeConfig);
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            }
        });
       
        JspApplicationContext jspAppCtx = control.createMock(JspApplicationContext.class);
        expect(jspAppCtx.getExpressionFactory()).andReturn(expressionFactory);
        jspAppCtx.addELContextListener(isA(FacesELContextListener.class));
        expect(jspFactory.getJspApplicationContext(eq(context))).andReturn(jspAppCtx);
        jspAppCtx.addELResolver(isA(FacesCompositeELResolver.class));

        control.replay();
        initializer.initFaces(context);
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            }
        });
       
        JspApplicationContext jspAppCtx = control.createMock(JspApplicationContext.class);
        expect(jspAppCtx.getExpressionFactory()).andReturn(expressionFactory);
        jspAppCtx.addELContextListener(isA(FacesELContextListener.class));
        expect(jspFactory.getJspApplicationContext(eq(context))).andReturn(jspAppCtx);
        jspAppCtx.addELResolver(isA(FacesCompositeELResolver.class));

        control.replay();
        initializer.initFaces(context);
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            }
        });
       
        JspApplicationContext jspAppCtx = control.createMock(JspApplicationContext.class);
        expect(jspAppCtx.getExpressionFactory()).andReturn(expressionFactory);
        jspAppCtx.addELContextListener(isA(FacesELContextListener.class));
        expect(jspFactory.getJspApplicationContext(eq(context))).andReturn(jspAppCtx);
        jspAppCtx.addELResolver(isA(FacesCompositeELResolver.class));

        control.replay();
        initializer.initFaces(context);
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

        // get JspApplicationContext.
        JspApplicationContext jspAppContext = JspFactory.getDefaultFactory().getJspApplicationContext( servletContext);

        // register compositeELResolver with JSP
        jspAppContext.addELResolver(beanManager.getELResolver());
        jspAppContext.addELContextListener(Reflections.<ELContextListener>newInstance("org.jboss.weld.el.WeldELContextListener", getClass().getClassLoader()));

        return beanManager.wrapExpressionFactory(expressionFactory);
    }

    private BeanManager getBeanManager() {
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

             jspAppContext.addELResolver(beanManager.getELResolver());

             try {
                 Class weldClass = Class.forName("org.jboss.weld.el.WeldELContextListener");
                 WeldELContextListener welcl = (WeldELContextListener)weldClass.newInstance();
                 jspAppContext.addELContextListener(welcl);
             } catch (Exception e) {
                 _logger.log(Level.WARNING, "Could not create WeldELContextListener instance. ", e);
             }

            ((JspApplicationContextImpl)jspAppContext).setExpressionFactory(
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

             jspAppContext.addELResolver(beanManager.getELResolver());

             try {
                 Class weldClass = Class.forName("org.jboss.weld.el.WeldELContextListener");
                 WeldELContextListener welcl = ( WeldELContextListener ) weldClass.newInstance();
                 jspAppContext.addELContextListener(welcl);
             } catch (Exception e) {
                 logger.log(Level.WARNING,
                            CDILoggerInfo.CDI_COULD_NOT_CREATE_WELDELCONTEXTlISTENER,
                            new Object [] {e});
             }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

             jspAppContext.addELResolver(beanManager.getELResolver());

             try {
                 Class weldClass = Class.forName("org.jboss.weld.el.WeldELContextListener");
                 WeldELContextListener welcl = (WeldELContextListener)weldClass.newInstance();
                 jspAppContext.addELContextListener(welcl);
             } catch (Exception e) {
                 logger.log(Level.WARNING,
                            CDILoggerInfo.CDI_COULD_NOT_CREATE_WELDELCONTEXTlISTENER,
                            new Object [] {e});
             }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext.addELContextListener()

            // Register the ELResolver with JSP
            jspApplicationContext.addELResolver(manager.getELResolver());

            // Register ELContextListener with JSP
            try {
                jspApplicationContext.addELContextListener(Reflections.<ELContextListener> newInstance("org.jboss.weld.el.WeldELContextListener"));
            } catch (IllegalArgumentException e) {
                throw WeldServletLogger.LOG.errorLoadingWeldELContextListener(e);
            }

            // Push the wrapped expression factory into the servlet context so that Tomcat or Jetty can hook it in using a container code
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.