• Post Reply Bookmark Topic Watch Topic
  • New Topic

FacesContext Object  RSS feed

 
saleem basha
Greenhorn
Posts: 5
C++ Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
This is saleem.I am new to jsf.I need one clarification about FacesContext object in jsf...Please tell me life cycle of FacesContext Object( who creates this object,who uses this,who destroys this object) in detail..


Thanks in advance...........................
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FacesContext is created by the FacesServlet when an incoming URL matches a URL pattern in web.xml that directs the URL to the FacesServlet. So, in other words, it's not created when ordinary (non-JSF) servlets, JSPs, and other URL resources are requested.

The FacesContext is the anchor point for the JSF lifecycle. It is constructed when the FacesServlet begins to process the request (starts the lifecycle), it's used as the anchor point throughout the lifecycle, and then it's discarded once the response for that request has been sent back. FacesContexts do not exist between requests.

Although the FacesContext is accessed by its class name and not as an instance, all user-written JSF code sees it as a unique instance, independent of whatever other requests are being processed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!