Question: Why do I get errors when using the book's build instructions with Tomcat 5.5.x?
Answer: Unlike Tomcat 5.0.x, Tomcat 5.5.x doesn't have the commons-digester.jar and commons-beanutils.jar in the tomcat/server/lib directory. Instead, these files need to be obtained from jsf/lib.
In step 4 of the instructions on page 11, change
comcat/server/lib/commons-digester.jar
tomcat/server/lib/commons-beanutils.jar
to
jsf/lib/commons-digester.jar
jsf/lib/commons-beanutils.jar
jsf/lib/commons-collections.jar
web.xml 文件
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
</web-app>