It hit me this afternoon that there is yet another possible cause for this error that might catch the new developer off guard.
Which version of JSF are you using?
No, I don't mean the version number. I mean which implementation? Don't know? Better find out, because there are two very popular ones.
The first is Mojarra, which is the JSF implementation developed by Sun. It's the one I've used most often in my own JSF Portlets in Liferay. The other is MyFaces from Apache. They both comply with the JSF standard, and are usually interchangeable...
You have to make sure you know which one you're dealing with when you're editing your web.xml. When you configure your listener, you need to know which implementation you're working with so that you can configure it to call the correct class.
If you're using Mojarra, then your listener should look like this:
If you're using Apache MyFaces, then it should look like this:
<listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>
Make sure you're configuring for the right implementation!