background image

Including the Required JAR Files

<< Verifying Custom Objects | Java Platform Localization Classes >>
<< Verifying Custom Objects | Java Platform Localization Classes >>

Including the Required JAR Files

Including the Required JAR Files
JavaServer Faces applications require several JAR files to run properly. These JAR files are as
follows:
jsf-api.jar
(contains the javax.faces.* API classes)
jsf-impl.jar
(contains the implementation classes of the JavaServer Faces
implementation)
jstl.jar
(required to use JSTL tags and referenced by JavaServer Faces implementation
classes)
standard.jar
(required to use JSTL tags and referenced by JavaServer Faces reference
implementation classes)
commons-beanutils.jar
(utilities for defining and accessing JavaBeans component
properties)
commons-digester.jar
(for processing XML documents)
commons-collections.jar
(extensions of the Java 2 SDK Collections Framework)
commons-logging.jar
(a general-purpose, flexible logging facility to allow developers to
instrument their code with logging statements)
The jsf-api.jar and the jsf-impl.jar files are located in as-install/lib. The jstl.jar file is
bundled in appserv-jstl.jar. The other JAR files are bundled in the appserv-rt.jar, also
located in as-install/lib/.
When packaging and deploying your JavaServer Faces application, you do not need to explicitly
package any of the JAR files.
Including the Classes, Pages, and Other Resources
When packaging web applications using the included build scripts, you'll notice that the scripts
package resources as described here:
All JSP pages are placed at the top level of the WAR file.
The TLD files, the faces-config.xml file, and the web.xml file are packaged in the WEB-INF
directory.
All packages are stored in the WEB-INF/classes/ directory.
All JAR files are packaged in the WEB-INF/lib/ directory.
When packaging your own applications, you can use NetBeans IDE or you can use the build
scripts included with the tutorial examples, as explained throughout the preceding chapters.
You can modify the build scripts to fit your situation. However, it is recommended that you
continue to package your WAR files as described in this section because this technique complies
with commonly-accepted practice for packaging web applications.
Basic Requirements of a JavaServer Faces Application
The Java EE 5 Tutorial · September 2007
466