I've wrote many web applications using JSF/Facelets before and all these run fine in Tomcat. Currently our company decides to move to use JBoss AS 4.2.1. I got very big problem since as I dpeloy the WARs onto the JBoss AS I got many exceptions. I notice that the JBOss AS has own lib for JSF/Facelets. So I comment out the dependencies in my "pom.xml" where using jsf/facelets and try to dpeloy again. But it failed again.
You can have Maven dependencies which will not get included into the WAR file by setting the scope to provided, e.g.:
<dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency>