Software Installation
You need the following software packages
to get started:
JDK (Java SE Development Kit) 5.0 or
higher (http://java.sun.com/j2se)
JSF 1.2
The sample code for this book, available
at http://corejsf.com
We assume that you have already
installed the JDK and that you are familiar with the JDK tools. For more
information on the JDK, see Horstmann, Cay, and Cornell, Gary, 2004, 2005. Core Java ™ 2, vol.
2—Advanced Features (7th ed.). Santa Clara, CA: Sun Microsystems
Press/Prentice Hall.
Since JSF 1.2 is part of the Java EE 5 specification, the
easiest way to try out JSF is to use an application server that is compatible
with Java EE 5. In this section, we describe the GlassFish application server
(http://glassfish.dev.java.net).
You will find instructions for other application servers on the companion web
site (http://corejsf.com).
Note
|
As this book is published, there are two major versions of JSF. The most recent version, JSF 1.2, was released as part of Java EE 5 in 2006. The original version, JSF 1.0, was released in 2004, and a bug-fix release, named JSF 1.1, was issued shortly thereafter. This book covers both versions 1.1 and 1.2, but the main focus is on version 1.2. |
Note
|
If you do not want to install a complete application server, you can also use Tomcat (http://tomcat.apache.org), together with the JSF libraries from Sun Microsystems (http://javaserverfaces.dev.java.net). See the book's companion web site (http://corejsf.com) for installation instructions. |
Install GlassFish, following
the directions on the web site. Then start the application server. On
Unix/Linux, you use the command
glassfish/bin/asadmin start-domain
(See Figure 1-1.) Here, glassfish is the directory into
which you installed the GlassFish software.
On Windows, launch
glassfish\bin\sadmin start-domain
To test that GlassFish runs
properly, point your browser to http://localhost:8080. You should see a welcome page (see Figure 1-2).
You shut
down GlassFish with the command
glassfish/bin/asadmin stop-domain
or, on Windows,
glassfish\bin\sadmin stop-domain
No comments:
Post a Comment