Package org.apache.myfaces.trinidadinternal.context.external

Examples of org.apache.myfaces.trinidadinternal.context.external.ServletExternalContext


  @Override
  @Deprecated
  public RequestContext createContext(Object context, Object request)
  {
    return createContext(new ServletExternalContext((ServletContext)context, (ServletRequest)request, null));
  }
View Full Code Here


    // Set a flag so that we can detect if the filter has been
    // properly installed.
    request.setAttribute(_FILTER_EXECUTED_KEY, Boolean.TRUE);

    ExternalContext externalContext = new ServletExternalContext(_servletContext, request, response);   
    GlobalConfiguratorImpl config = GlobalConfiguratorImpl.getInstance();
    config.beginRequest(externalContext);
   
    //To maintain backward compatibilty, wrap the request at the filter level
    Map<String, String[]> addedParams = (Map<String, String[]>) externalContext.getRequestMap().
      get(FileUploadConfiguratorImpl._PARAMS);
   
    if(addedParams != null)
    {
      FileUploadConfiguratorImpl.apply(externalContext);
View Full Code Here

    HttpServletResponse monitor
      = new MonitorRedirectServletResponse((HttpServletResponse) response, request);
   
    // -= Scott O'Bryan =-
    // Added for backward compatibility
    ExternalContext ec = new ServletExternalContext(_servletContext, request, monitor);
    HttpServletResponse dispatch = new DispatchServletResponse(ec);
    DispatchResponseConfiguratorImpl.apply(ec);

    _invokeDoFilter(request, dispatch, chain);
View Full Code Here

  {
    // Set up a PseudoFacesContext with the actual request and response
    // so that RequestContext can be more functional in the interval
    // between now and when the FacesServlet starts.
    PseudoFacesContext pfc = new PseudoFacesContext(
      new ServletExternalContext(_servletContext, request, response));
    _PSEUDO_FACES_CONTEXT.set(pfc);
    try
    {
      chain.doFilter(request, response);
    }
View Full Code Here

    // Set a flag so that we can detect if the filter has been
    // properly installed.
    request.setAttribute(_FILTER_EXECUTED_KEY, Boolean.TRUE);

    ExternalContext externalContext = new ServletExternalContext(_servletContext, request, response);   
    GlobalConfiguratorImpl config = GlobalConfiguratorImpl.getInstance();
    config.beginRequest(externalContext);
   
    //To maintain backward compatibilty, wrap the request at the filter level
    Map<String, String[]> addedParams = FileUploadConfiguratorImpl.getAddedParameters(externalContext);
View Full Code Here

    ServletResponse response,
    FilterChain     chain) throws IOException, ServletException
  {
    // -= Scott O'Bryan =-
    // Added for backward compatibility
    ExternalContext ec = new ServletExternalContext(_servletContext, request, response);
    HttpServletResponse dispatch = new DispatchServletResponse(ec);
    DispatchResponseConfiguratorImpl.apply(ec);

    _invokeDoFilter(request, dispatch, chain);
View Full Code Here

  {
    // Set up a PseudoFacesContext with the actual request and response
    // so that RequestContext can be more functional in the interval
    // between now and when the FacesServlet starts.
    PseudoFacesContext pfc = new PseudoFacesContext(
      new ServletExternalContext(_servletContext, request, response));
    _PSEUDO_FACES_CONTEXT.set(pfc);
    try
    {
      chain.doFilter(request, response);
    }
View Full Code Here

    _servletContext = filterConfig.getServletContext();
           
    //There is some functionality that still might require servlet-only filter services.
    _filters = ClassLoaderUtils.getServices(TrinidadFilterImpl.class.getName());

    ExternalContext externalContext = new ServletExternalContext(
                                        _servletContext, null, null);

    PseudoFacesContext facesContext = new PseudoFacesContext(externalContext);
    facesContext.setAsCurrentInstance();
View Full Code Here

    // potentially wrap the request in order to check managed bean HA
    if (request instanceof HttpServletRequest)
    {
      request = CheckSerializationConfigurator.getHttpServletRequest(
                                    new ServletExternalContext(_servletContext, request, response),
                                    (HttpServletRequest)request);
    }
   
    // potentially wrap the ServletContext in order to check managed bean HA
    ExternalContext externalContext = new ServletExternalContext(
                                        _getPotentiallyWrappedServletContext(request),
                                        request,
                                        response);

    // provide a (Pseudo-)FacesContext for configuration tasks
View Full Code Here

    FilterChain     chain) throws IOException, ServletException
  {
    // -= Scott O'Bryan =-
    // Added for backward compatibility
    // potentially wrap the ServletContext to check ManagerBean HA
    ExternalContext ec = new ServletExternalContext(_getPotentiallyWrappedServletContext(request),
                                                    request,
                                                    response);
   
    boolean isHttpReq = ExternalContextUtils.isHttpServletRequest(ec);
   
    if(isHttpReq)
    {
      response = _getResponse(ec);
      ec.setResponse(response);
    }
    
    // Set up a PseudoFacesContext with the actual request and response
    // so that RequestContext can be more functional in the interval
    // between now and when the FacesServlet starts.
    PseudoFacesContext pfc = new PseudoFacesContext(ec);
    _PSEUDO_FACES_CONTEXT.set(pfc);
    try
    {
      if(isHttpReq)
      {
        // If there are existing "launchParameters", then that means
        // we've returned from a "launch", and we need to re-execute the
        // faces lifecycle.  ViewHandlerImpl will be responsible for ensuring
        // that we re-execute the lifecycle on the correct page.
        // -= Simon Lessard =-
        // FIXME: Using <String, String[]> for now to accomodate ReplaceParametersRequestWrapper.
        //        However, the Servlet specification suggest <String, Object> so this
        //        could lead to some nasty problems one day. Especially if JEE spec includes
        //        generics for its Servlet API soon.
        //
        // -= Scott O'Bryan =-
        // TODO: The following should be made available to the Portal.  This is not trivial
        //       because this just re-invokes the filter chain with a new set of parameters.
        //       In the portal environment, this must rerun the portlet without the use of
        //       filters until Portlet 2.0.
        request = _getRequest(ec);
        ec.setRequest(request);
      }
     
      chain.doFilter(request, response);

      if(isHttpReq)
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.context.external.ServletExternalContext

Copyright © 2018 www.massapicom. 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.