Finishing Touches

That about does it for the code walkthrough. Since this is a moderately large application, downloading the code from this book’s web site is much easier than typing everything in by hand. Do not forget that several additional classes are listed in Appendix B.

Deployment

A deployment descriptor and WAR file are required to deploy and test the application. The deployment descriptor, web.xml, is shown in Example 7-39.

Example 7-39. Deployment descriptor

<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"> <web-app> <servlet> <servlet-name>forumServlet</servlet-name> <servlet-class>com.oreilly.forum.servlet.ForumServlet</servlet-class> <init-param> <param-name>jdbcDriverClassName</param-name> <!-- MySQL version is commented out: <param-value>org.gjt.mm.mysql.Driver</param-value> --> <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value> </init-param> <init-param> <param-name>databaseURL</param-name> <!-- MySQL version is commented out: <param-value>jdbc:mysql://localhost:3306/forum</param-value> --> <param-value>jdbc:odbc:forum</param-value> </init-param> <init-param> <param-name>adapterClassName</param-name> <!-- Relational database version is commented out: <param-value>com.oreilly.forum.jdbcimpl.JdbcDataAdapter</param-value> --> <param-value>com.oreilly.forum.fakeimpl.FakeDataAdapter</param-value> </init-param> </servlet> <servlet-mapping> ...

Get Java and XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.