users@glassfish.java.net

JSF 2 not working with Glassfish V3?

From: Mark Space <markspace_at_sbcglobal.net>
Date: Fri, 05 Feb 2010 13:21:24 -0800

Hi all,

I have what is likely a configuration issue but I can't work out where
the problem is. I made a simple JSF 2 page to test out my Glassfish
installation.

What I'm seeing is is that custom actions don't seem to be interpreted
at all. They just end up in the output on the client (browser)
unchanged. In addition, EL expressions that reference managed beans end
up the same way: #{bean.property} just gets passed straight through to
the client un-altered.

Here's my JSF page. There's a lot less config than previous versions of
JSF/JSP, but I thought that was the point with 2.0.

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        Hello from Facelets
        <br /><br />
        #{TestBean.hashCode}
        <br /><br />
        <h:form>
            <h:inputText size="2" maxlength="2"/>
            <h:commandButton id="submit" value="submit" action="response" />
        </h:form>
    </h:body>
</html>

Both the #{TestBean.hashCode} and the entire <h:form> element get passed
to the browser unchanged. I assume there's some obvious configuration
missing but I can't guess what. Most of this project is auto-generated
in NetBeans and I assume correct. It looks right when I browse through
the files in the War file. But obviously something is amiss.

Any ideas? Help is much appreciated.