[jboss-user] [JBoss Seam] - Re: How can I create seam context etc in httpservlet

Ci do-not-reply at jboss.com
Thu Oct 12 08:59:32 EDT 2006


1: I do like below:

FacesContextFactory _facesContextFactory =
  |    (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
  | LifecycleFactory lifecycleFactory =
  |    (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
  | ServletContext servletContext = getServletConfig().getServletContext();
  | String lifecycleId = servletContext.getInitParameter(FacesServlet.LIFECYCLE_ID_ATTR);
  | javax.faces.lifecycle.Lifecycle _lifecycle = lifecycleFactory.getLifecycle(
  |    lifecycleId != null ? lifecycleId : LifecycleFactory.DEFAULT_LIFECYCLE
  | );
  | FacesContext facesContext =
  |    _facesContextFactory.getFacesContext(
  |       servletContext,
  |       request,
  |       response,
  |       _lifecycle
  |    );

BTW, isn't it too complex?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977869#3977869

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977869



More information about the jboss-user mailing list