• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Is FacesContext an object for entire aplication, or it's instantiated for each jsf page?

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is FacesContext an object for entire aplication, or it's instantiated for each jsf page?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


FacesContext object is created for entire application, and it handle multiple faces requests.


Thanks

A.Viswanath Yadav
 
Saloon Keeper
Posts: 25620
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

viswanath yadav wrote:

FacesContext object is created for entire application, and it handle multiple faces requests.


Thanks

A.Viswanath Yadav



No.

The FacesContext is created and destroyed on every JSF page request. In between page requests, it doesn't exist at all.

One of the more common problems people have with JSF, in fact, is that they attempt to access the FacesContext while handling a non-JSF request such as in a servlet, non-JSF JSP or Struts Action. They fail on a NullPointerException.

JSF is not a "Master Control Program".
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic