Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There have been several posts asking how to get a Faces Context from outside of JSF such as in a servlet. There are many reasons for doing this such as:1

  1. Getting to a managed bean in session scope

...

  1. Getting or setting the current view id

...

  1. Generating additional content to be displayed in a faces component

...

  1. Performing authentication and session management

...

  1. Various other reasons you can come up with...

Below is one way to do this.

...