• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why does FacesContext .getCurrentInstance() return null?

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a servlet (several actually) in a JSF application that I need to gain access to the FacesContext in.

I noticed that often when I call FacesContext .getCurrentInstance() it will return null.

Now, it is my understanding that as long as a JSF page within my application had been called previously, then the FacesContext should have been set up. Is this not the case?

Any clues as to why the context is null?

This is driving my nuts!
[ December 02, 2005: Message edited by: Darrin Smith ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic