Examples of JspApplicationContext


Examples of javax.servlet.jsp.JspApplicationContext

            logger.log(Level.FINE, "Application is configured as JSP. Adding EL Resolver.");
           
            JspFactory factory = JspFactory.getDefaultFactory();
            if (factory != null)
            {
                JspApplicationContext applicationCtx = factory.getJspApplicationContext((ServletContext)(startupObject));
                applicationCtx.addELResolver(resolver);               
            }           
            else
            {
                logger.log(Level.FINE, "Default JSPFactroy instance has not found");
            }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

     */
    private Object convertToExpectedType( final Object value,
                                          Class expectedType ) {

        JspFactory jspFactory = JspFactory.getDefaultFactory();
        JspApplicationContext jspAppContext =
            jspFactory.getJspApplicationContext(pageContext.getServletContext());
        ExpressionFactory exprFactory = jspAppContext.getExpressionFactory();
        return exprFactory.coerceToType(value, expectedType);
    }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

            if (associate != null) {
                associate.setFacesELResolverForJsp(compositeELResolverForJsp);
            }

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

            // cache the ExpressionFactory instance in ApplicationAssociate
            if (associate != null) {
                associate.setExpressionFactory(jspAppContext.getExpressionFactory());
            }

            // register compositeELResolver with JSP
            try {
                jspAppContext.addELResolver(compositeELResolverForJsp);
            }
            catch (IllegalStateException e) {
                ApplicationFactory factory = (ApplicationFactory)
                        FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
                Application app = factory.getApplication();
                if (app.getProjectStage() != ProjectStage.UnitTest && !reloaded) {
                    throw e;
                }
            }

            // register JSF ELContextListenerImpl with Jsp
            ELContextListenerImpl elContextListener = new ELContextListenerImpl();
            jspAppContext.addELContextListener(elContextListener);
        }
    }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

            logger.log(Level.FINE, "Application is configured as JSP. Adding EL Resolver.");
           
            JspFactory factory = JspFactory.getDefaultFactory();
            if (factory != null)
            {
                JspApplicationContext applicationCtx = factory.getJspApplicationContext((ServletContext)(startupObject));
                applicationCtx.addELResolver(resolver);               
            }           
            else
            {
                logger.log(Level.FINE, "Default JSPFactroy instance has not found");
            }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

        {
            // check this application is JSF application
            URL url = context.getResource("/WEB-INF/faces-config.xml");
            if (url == null)
            {
                JspApplicationContext applicationCtx = JspFactory.getDefaultFactory().getJspApplicationContext(context);
                applicationCtx.addELResolver(new WebBeansELResolver());
            }

        }
        catch (MalformedURLException e)
        {
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

     */
    private Object convertToExpectedType( final Object value,
                                          Class expectedType ) {

        JspFactory jspFactory = JspFactory.getDefaultFactory();
        JspApplicationContext jspAppContext =
            jspFactory.getJspApplicationContext(pageContext.getServletContext());
        ExpressionFactory exprFactory = jspAppContext.getExpressionFactory();
        return exprFactory.coerceToType(value, expectedType);
    }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

                logger.error("Error merging Java EE JNDI entries in to war " + standardContext.getPath() + ": Exception: " + e.getMessage(), e);
            }

            JspFactory factory = JspFactory.getDefaultFactory();
            if (factory != null) {
                JspApplicationContext applicationCtx = factory.getJspApplicationContext(standardContext.getServletContext());
                WebBeansContext context = appContext.getWebBeansContext();
                if (context != null && context.getBeanManagerImpl().isInUse()) {
                    // Registering ELResolver with JSP container
                    ELAdaptor elAdaptor = context.getService(ELAdaptor.class);
                    ELResolver resolver = elAdaptor.getOwbELResolver();
                    applicationCtx.addELResolver(resolver);
                }
            }
        }
    }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

        if (context.getOpenWebBeansConfiguration().isJspApplication()) {
            logger.debug("Application is configured as JSP. Adding EL Resolver.");

            JspFactory factory = JspFactory.getDefaultFactory();
            if (factory != null) {
                JspApplicationContext applicationCtx = factory.getJspApplicationContext(servletContext);
                applicationCtx.addELResolver(resolver);
            } else {
                logger.debug("Default JSPFactroy instance has not found");
            }
        }
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

            {
                return (String) org.easymock.EasyMock.getCurrentArguments()[0];
            }
        });
       
        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);

        // In MYFACES-1222: The Jsp21FacesInitializer isn't practicable anymore.
View Full Code Here

Examples of javax.servlet.jsp.JspApplicationContext

            // check this application is JSF application
            URL url = context.getResource("/WEB-INF/faces-config.xml");
            URL urlWeb = context.getResource("/WEB-INF/web.xml");
            if (url == null && urlWeb != null)
            {
                JspApplicationContext applicationCtx = JspFactory.getDefaultFactory().getJspApplicationContext(context);
                applicationCtx.addELResolver(new WebBeansELResolver());
            }

        }
        catch (MalformedURLException e)
        {
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.