I've just set up a new JSF 1.2 project and can't get the test page up and running. I followed this tutorial to get a GlassFish 3.1 server set up in Eclipse. I've created a simple page to make sure it's working correctly, but when I try to access it, I get this:
Here's my web.xml
I've seen several posts on other sites with this problem, but no real solutions. Any help is appreciated.
I believe that you have made the common mistake of confusing a resource path with a URL path. Resource paths and URL paths have similar syntax, but they refer to completely different things handled by completely different subsystems.
A URL is the "address" of an application functional point. It is parsed by the webapp server in order to direct it to the appropriate webapp and servlet (or JSP) within the webapp, which in turn typically parses the URL in order to marshall resources and dispatch actions.
xhtml resources are Facelet definitions in the JSF View Definition Language. Facelets, incidentally are not a part of JSF version 1, so you will have to manually include Facelets support jars and web.xml definitions for a JSF 1.2 webapp.
You do not reference these resources directly in URLs. The view template resource path is computed by dissection and replacement of the URL path. Most commonly, (using the typical web.xml settings) this means that a URL such as "http://www.coderanch.com/superApp/hello.jsf" will be converted to create the resource path of "/hello.xhtml" and the hello.xhtml file will then be read and used by the FacesServlet to construct the desired response.
When you pass in a URL ending with ".xhtml" with the web.xml setting you have, it is attempting to convert a resource into a resource instead of a URL into a resource, and the results are not pretty.
To remedy this, remove the ".xhtml" URL pattern and replace it with a ".jsf" pattern and use a URL of "hello.jsf".
Customer surveys are for companies who didn't pay proper attention to begin with.