Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does FacesContext .getCurrentInstance() return null?

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic