users@glassfish.java.net

JSF 2.0.1 does NOT work in both Tomcat and GlassFishv3 (fails in GlassFish)

From: <glassfish_at_javadesktop.org>
Date: Wed, 04 Nov 2009 10:10:46 PST

We have a Maven war project that includes the 2.0.1-b02 impl/api jars into our war file.... we deploy our war to both Tomcat and GlassFish (we are evaluating moving to GlassFish v3 Preview). I added the following to my sun-web.xml file (to have GlassFish use the version of JSF I have in my war file):

class-loader delegate="false"
property name="useBundledJsf" value="true"

but, when I do this, I get the following error when I deploy my simple war file:

java.lang.Exception: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getServletRegistrations()Ljava/util/Map;

I know I don't need 2.0.1 for GlassFish v3 Preview, but I'm trying to use the SAME war file that I use in Tomcat as I use in Glassfish. Attached is the simple Maven JSF2.0.1 HelloWorld project that shows this problem.

Am I doing something wrong?

Notes:
- We are using a unmodified version of Tomcat 6.0.
- I'm using bundled version of servlet-api.jar file that comes with the app server (Tomcat version: 2.5 Glassfish: 3.0-Preview).
- If I include the servlet-api-2.5.jar in my war I STILL get the same results.

Thanks,
Jeff
[Message sent by forum member 'jeffcampbell' (jeffcampbell_at_idea1.com)]

http://forums.java.net/jive/thread.jspa?messageID=370522