build jsf

Here are the build instructions for the sample JSF application.
1. Launch a command shell.
2. Change to the corejsf-examples directory―that is, the directory that contains
the sample code for this book.
3. If you use GlassFish or another Java EE 6 compliant application server,
change to the javaee subdirectory. If you use Tomcat, change to the tomcat
subdirectory.
4. Change to the source directory and make the directory for holding the
class files:
cd ch01/login/src/java
mkdir ../../web/WEB-INF/classes
On Windows, use backslashes as file separators.
5. If you use GlassFish, run
javac -d ../../web/WEB-INF/classes -classpath .:glassfish/modules/\*
com/corejsf/UserBean.java
A Simple Example 11
On Windows, use a semicolon in the classpath, and don’t escape the *
wildcard:
javac -d ..\..\web\WEB-INF\classes -classpath  /path/to/glassfish/lib/javaee.jar
com\corejsf\UserBean.java
If you use Tomcat, use the following command to compile your code:
javac -d ../../web/WEB-INF/classes -classpath .:jsf-ref-impl/lib/jsf-api.jar
com/corejsf/UserBean.java
6. If you use Tomcat, you need to include the JSF libraries:
mkdir ../../web/WEB-INF/lib
cp jsf-ref-impl/lib/*.jar ../../web/WEB-INF/lib
Skip this step if you use a Java EE 6 compliant application server.
7. Run the following commands (and note the period at the end of the jar
command, indicating the current directory):
cd ../..
jar cvf login.war .

你可能感兴趣的:(JSF,Build)