Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/indispensable.git
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass scrbook
\begin_preamble
\input{preamble.tex}
\end_preamble
\options pointlessnumbers,obeyspaces,plainpages=false,pdfpagelabels 
\use_default_options false
\language english
\inputencoding utf8
\font_roman lmodern
\font_sans helvet
\font_typewriter courier
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\float_placement H
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize letterpaper
\use_geometry false
\use_amsmath 2
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\bullet 0 5 11 -1
\bullet 1 5 24 -1
\bullet 2 0 0 -1
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begingroup
\backslash
hypersetup{linkcolor=toccolour}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
endgroup
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
input{chapter.tex}
\end_layout

\end_inset


\end_layout

\begin_layout Chapter
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 -- Linux
\end_layout

\begin_layout Standard
Describes how to set up a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 environment for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 using 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

 1.2.
\end_layout

\begin_layout Section
Software Requirements
\end_layout

\begin_layout Standard
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:Software-Downloads"

\end_inset

 lists the software required to develop a RichFaces application using 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "tab:Software-Downloads"

\end_inset

Software Downloads
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="3">
<features>
<column alignment="left" valignment="top" width="0">
<column alignment="left" valignment="top" width="0">
<column alignment="left" valignment="top" width="0">
<row>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
rowcolor{tableheader}
\backslash
toprule{}
\end_layout

\end_inset


\series bold
Software
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Notes
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "Apache Ant"
target "http://ant.apache.org/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1.8.2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Binary zip file
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "Apache Tomcat"
target "http://tomcat.apache.org/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
6.0.32
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Binary zip file
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "Eclipse"
target "http://www.eclipse.org/downloads/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3.6.1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IDE for Java EE Developers
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "Java"
target "http://www.oracle.com/technetwork/java/javase/downloads/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1.6.0_24
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
JDK 6u24
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "JavaServer Faces"
target "http://javaserverfaces.java.net/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1.2_15
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Binary zip file (mojarra)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "Facelets"
target "http://repository.jboss.org/maven2/com/sun/facelets/jsf-facelets/1.1.14/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1.1.14
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Binary jar file (not sources)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "JBoss Tools"
target "http://download.jboss.org/jbosstools/updates/JBossTools-3.1.1.GA/"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3.2.0 GA
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 plug-in
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
name "RichFaces"
target "http://www.jboss.org/richfaces"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
3.3.3.Final
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Zip archive
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
tabularnewline
\backslash
bottomrule%
\end_layout

\end_inset


\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Delete or uninstall all previous 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 installations and 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 compilers.
 For example, type:
\end_layout

\begin_deeper
\begin_layout LyX-Code
sudo aptitude remove openjdk-6-jdk openjdk-6-jre
\end_layout

\begin_layout LyX-Code
sudo aptitude remove icedtea-6-jre-cacao gcj
\end_layout

\end_deeper
\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Extract and install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 as follows:
\end_layout

\begin_deeper
\begin_layout LyX-Code
sudo su -
\end_layout

\begin_layout LyX-Code
cd 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
chmod +x 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

jdk*.bin
\end_layout

\begin_layout LyX-Code
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

jdk*.bin
\end_layout

\begin_layout LyX-Code
ln -s /opt/jdk1.6.0_24 /opt/jdk
\end_layout

\end_deeper
\begin_layout Enumerate
Logout of the root account.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 is installed.
\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

 into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Extract 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

 as follows:
\end_layout

\begin_deeper
\begin_layout LyX-Code
sudo su -
\end_layout

\begin_layout LyX-Code
cd 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirrootprog{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
unzip 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

apache-ant*.zip
\end_layout

\begin_layout LyX-Code
ln -s /opt/apache-ant-1.8.2 /opt/ant
\end_layout

\end_deeper
\begin_layout Enumerate
Logout of the root account.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

 is installed.
\end_layout

\begin_layout Section
Executables
\end_layout

\begin_layout Standard
Complete the following steps to configure the 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 and 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

 executables:
\end_layout

\begin_layout Enumerate
Append the following lines to 
\family typewriter
$HOME/.bashrc
\family default
:
\end_layout

\begin_deeper
\begin_layout LyX-Code

\size small
JAVA_HOME=/opt/jdk
\end_layout

\begin_layout LyX-Code

\size small
ANT_HOME=/opt/ant
\end_layout

\begin_layout LyX-Code

\size small
PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
\end_layout

\begin_layout LyX-Code

\size small
export PATH JAVA_HOME ANT_HOME
\end_layout

\end_deeper
\begin_layout Enumerate
Reload the environment:
\end_layout

\begin_deeper
\begin_layout LyX-Code
source $HOME/.bashrc
\end_layout

\end_deeper
\begin_layout Enumerate
Verify the installations:
\end_layout

\begin_deeper
\begin_layout LyX-Code
java -version
\end_layout

\begin_layout LyX-Code
ant -version
\end_layout

\end_deeper
\begin_layout Standard
Messages showing the installed versions of 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjava{}
\end_layout

\end_inset

 and 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapacheant{}
\end_layout

\end_inset

 are displayed.
\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset

 into 
\family typewriter

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset


\family default
.
\end_layout

\begin_layout Enumerate
Extract 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset

 as follows:
\end_layout

\begin_deeper
\begin_layout LyX-Code
mkdir -p $HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
cd $HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
unzip 
\family typewriter

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset


\family default
apache-tomcat*.zip
\end_layout

\begin_layout LyX-Code
ln -s apache-tomcat-6.0.32 apache-tomcat
\end_layout

\begin_layout LyX-Code
chmod +x apache-tomcat/bin/*.sh
\end_layout

\end_deeper
\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset

 is installed.
\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 into 
\family typewriter

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset


\family default
.
\end_layout

\begin_layout Enumerate
Extract 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

:
\end_layout

\begin_deeper
\begin_layout LyX-Code
cd $HOME
\end_layout

\begin_layout LyX-Code
tar zxf 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

eclipse*.gz
\end_layout

\end_deeper
\begin_layout Enumerate
Run 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

:
\end_layout

\begin_deeper
\begin_layout LyX-Code
$HOME/eclipse/eclipse
\end_layout

\end_deeper
\begin_layout Enumerate
Set 
\series bold
Workspace
\series default
 to: 
\family typewriter
/home/
\series bold
username
\series default
/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset

/workspace
\end_layout

\begin_layout Enumerate
Click 
\series bold
OK
\series default
.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 is installed and running.
\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjboss{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
In 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

, complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjboss{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Click 
\series bold
Help » Install New Software
\series default
 to open the 
\series bold
Install
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Add
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Name
\series default
 to: 
\family typewriter
JBoss Tools 3.2
\end_layout

\begin_layout Enumerate
Set 
\series bold
Location
\series default
 to:
\end_layout

\begin_deeper
\begin_layout LyX-Code

\size small
http://download.jboss.org/jbosstools/updates/stable/helios/
\end_layout

\end_deeper
\begin_layout Enumerate
Click 
\series bold
OK
\series default
 to close the 
\series bold
Add Repository
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Check 
\series bold
Web and Java EE Development
\series default
 (
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:RichFaces-JBoss-Install-Unix"

\end_inset

).
\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename captures/richfaces-jboss-01.png
	display false
	special  

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:RichFaces-JBoss-Install-Unix"

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjboss{}
\end_layout

\end_inset

 Install
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\end_deeper
\begin_layout Enumerate
Click 
\series bold
Next
\series default
 to begin the installation.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Next
\series default
 to bypass the 
\series bold
Install Details
\series default
 review.
\end_layout

\begin_layout Enumerate
Click the radio button to accept the licensing terms.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
 to continue the installation.
\end_layout

\begin_layout Enumerate
Click 
\series bold
OK
\series default
 to confirm any security warnings.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Restart Now
\series default
 to restart 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Click 
\series bold
OK
\series default
 to confirm the workspace, after 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

 restarts.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Yes
\series default
 to permit (or 
\series bold
No
\series default
 to deny) anonymous 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjboss{}
\end_layout

\end_inset

 usage statistics.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjboss{}
\end_layout

\end_inset

 is installed.
\end_layout

\begin_layout Section
Create New Project
\end_layout

\begin_layout Standard
Complete the following steps to create a new project in 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
If it is still open, close the 
\series bold
Welcome
\series default
 tab.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Window » Open Perspective » Other
\series default
.
\end_layout

\begin_layout Enumerate
Select 
\series bold
Web Development
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
OK
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
File » New JSF Project
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Project Name
\series default
 to: 
\family typewriter

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirjsfproject{}
\end_layout

\end_inset


\end_layout

\begin_layout Enumerate
Set 
\series bold
JSF Environment
\series default
 to: 
\family typewriter
JSF 1.2
\end_layout

\begin_layout Enumerate
Click 
\series bold
Next
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Servlet Version
\series default
 to: 
\family typewriter
2.5
\end_layout

\begin_layout Enumerate
Click 
\series bold
New
\series default
, beside 
\series bold
Runtime
\series default
, to open the 
\series bold
New Server Runtime
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Select 
\series bold

\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appapachetomcat{}
\end_layout

\end_inset

 v6.0
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Next
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Name
\series default
 to: 
\family typewriter
Development Web Server
\end_layout

\begin_layout Enumerate
Click 
\series bold
Browse
\series default
.
\end_layout

\begin_layout Enumerate
Browse to 
\family typewriter
\size small
$HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset

/apache-tomcat
\family default
\size default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
OK
\series default
 to accept the directory.
\end_layout

\begin_layout Enumerate
Set 
\series bold
JRE
\series default
 to: 
\family typewriter
jdk1.6.0_24
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
 to close the 
\series bold
New Server Runtime
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Click 
\series bold
New
\series default
, beside 
\series bold
Target Server
\series default
, to open the 
\series bold
New Server
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Expand 
\series bold
Apache
\series default
.
\end_layout

\begin_layout Enumerate
Select 
\series bold
Tomcat v6.0 Server
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
 to close the 
\series bold
New Server
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Ensure 
\series bold
Development Web Server at localhost
\series default
 is checked.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
 to accept the 
\series bold
New JSF Project
\series default
 dialog settings.
\end_layout

\begin_layout Standard
The Package Explorer panel resembles 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:Package-Panel"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status collapsed

\begin_layout Plain Layout
\begin_inset Graphics
	filename captures/richfaces-jboss-02.png
	display false

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:Package-Panel"

\end_inset

Package Explorer Panel
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
A new project is created.
\end_layout

\begin_layout Section
Libraries
\end_layout

\begin_layout Standard
This section describes the libraries required to create a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 web page.
 The libraries include:
\end_layout

\begin_layout Itemize

\series bold
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset


\series default
 -- Application framework for developing web-based user interfaces.
\end_layout

\begin_layout Itemize

\series bold
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset


\series default
 -- Component library for 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

 that facilitates using Ajax.
\end_layout

\begin_layout Itemize

\series bold
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset


\series default
 -- Page declaration language to create 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

 views using HTML-style templates.
\end_layout

\begin_layout Standard
Note: The 
\family typewriter
<destination>
\family default
 directory throughout this section is defined as follows:
\end_layout

\begin_layout LyX-Code

\size small
$HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset

/workspace/
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
dirjsfproject{}
\end_layout

\end_inset

/WebContent/WEB-INF/lib
\end_layout

\begin_layout Subsection
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Note: 
\family typewriter
<source>
\family default
 refers to 
\family typewriter
$HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset

/jsf/lib/
\family default
.
\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

 into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Extract 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsf{}
\end_layout

\end_inset

 as follows:
\end_layout

\begin_deeper
\begin_layout LyX-Code
cd $HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
unzip 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

mojarra*.zip
\end_layout

\begin_layout LyX-Code
ln -s mojarra-1.2_15-b01-FCS jsf
\end_layout

\end_deeper
\begin_layout Enumerate
Copy the following library files into the destination directory:
\end_layout

\begin_deeper
\begin_layout LyX-Code
cp <source>/jsf-impl.jar <destination>
\end_layout

\begin_layout LyX-Code
cp <source>/jsf-api.jar <destination>
\end_layout

\end_deeper
\begin_layout Subsection
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Note: 
\family typewriter
<source>
\family default
 refers to 
\family typewriter
$HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset

/richfaces/lib/
\family default
.
\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Extract 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 as follows:
\end_layout

\begin_deeper
\begin_layout LyX-Code
cd $HOME/
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
dirdev{}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
unzip 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

richfaces*.zip
\end_layout

\begin_layout LyX-Code
ln -s richfaces-ui-3.3.3.Final richfaces
\end_layout

\end_deeper
\begin_layout Enumerate
Copy the following library files into the destination directory:
\end_layout

\begin_deeper
\begin_layout LyX-Code

\size small
cp <source>/richfaces-api-3.3.3.Final.jar <destination>
\end_layout

\begin_layout LyX-Code

\size small
cp <source>/richfaces-impl-3.3.3.Final.jar <destination>
\end_layout

\begin_layout LyX-Code

\size small
cp <source>/richfaces-ui-3.3.3.Final.jar <destination>
\end_layout

\end_deeper
\begin_layout Subsection
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to install 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Download 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset

 into 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Move the 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset

 library file into the destination directory (note the new name):
\end_layout

\begin_deeper
\begin_layout LyX-Code

\size footnotesize
mv 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
unixdirtemp{}
\end_layout

\end_inset

jsf-facelets-1.1.14.jar <destination>/jsf-facelets.jar
\end_layout

\end_deeper
\begin_layout Section
Component Configuration
\end_layout

\begin_layout Standard
This section describes the steps to configure 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 and 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Subsection
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to configure 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

:
\end_layout

\begin_layout Enumerate
Switch to 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appeclipse{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Enumerate
Expand 
\series bold
WebContent » WEB-INF
\series default
.
\end_layout

\begin_layout Enumerate
Double-click 
\series bold
web.xml
\series default
.
\end_layout

\begin_layout Enumerate
Configure the filter as follows:
\end_layout

\begin_deeper
\begin_layout Enumerate
Click 
\series bold
Filters
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Add
\series default
 to add a 
\series bold
Filter
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Filter-Name
\series default
 to: 
\family typewriter
ajaxfilter
\end_layout

\begin_layout Enumerate
Set 
\series bold
Display-Name
\series default
 to: 
\family typewriter
Ajax JSF Filter
\end_layout

\begin_layout Enumerate
Set 
\series bold
Filter-Class
\series default
 to: 
\family typewriter
org.ajax4jsf.Filter
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Filters
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Add
\series default
 to add a 
\series bold
Filter Mapping
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Filter-Name
\series default
 to: 
\family typewriter
ajaxfilter
\end_layout

\begin_layout Enumerate
Set 
\series bold
Servlet-Name
\series default
 to: 
\family typewriter
Faces Servlet
\end_layout

\begin_layout Enumerate
Click 
\series bold
Browse
\series default
 to display the 
\series bold
Edit Dispatchers
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Check all dispatchers (
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:Filter-Mapping-Dispatchers"

\end_inset

).
\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status collapsed

\begin_layout Plain Layout
\begin_inset Graphics
	filename captures/richfaces-jboss-03.png
	display false

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:Filter-Mapping-Dispatchers"

\end_inset

Filter Mapping Dispatchers
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\end_deeper
\begin_layout Enumerate
Click 
\series bold
OK
\series default
 to close the 
\series bold
Edit Dispatchers
\series default
 dialog.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
 to close the 
\series bold
Add Filter Mapping
\series default
 dialog.
\end_layout

\end_deeper
\begin_layout Enumerate
Configure the listeners as follows:
\end_layout

\begin_deeper
\begin_layout Enumerate
Click 
\series bold
Listeners
\series default
.
\end_layout

\begin_layout Enumerate
Remove all Listener-Classes.
\end_layout

\end_deeper
\begin_layout Enumerate
Configure the context parameters as follows:
\end_layout

\begin_deeper
\begin_layout Enumerate
Click 
\series bold
Context Params
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Add
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
Param-Name
\series default
 to: 
\family typewriter
javax.faces.DEFAULT_SUFFIX
\end_layout

\begin_layout Enumerate
Set 
\series bold
Param-Value
\series default
 to: 
\family typewriter
.xhtml
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
.
\end_layout

\begin_layout Enumerate
Repeat the previous five steps for the following parameters:
\end_layout

\begin_deeper
\begin_layout Standard

\series bold
Param-Name
\series default
: 
\family typewriter
facelets.REFRESH_PERIOD
\end_layout

\begin_layout Standard

\series bold
Param-Value
\series default
: 
\family typewriter
2
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset


\family default
\series bold
Param-Name
\series default
: 
\family typewriter
facelets.DEVELOPMENT
\end_layout

\begin_layout Standard

\series bold
Param-Value
\series default
: 
\family typewriter
true
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset


\family default
\series bold
Param-Name
\series default
: 
\family typewriter
facelets.SKIP_COMMENTS
\end_layout

\begin_layout Standard

\series bold
Param-Value
\series default
: 
\family typewriter
true
\end_layout

\end_deeper
\end_deeper
\begin_layout Enumerate
Save the file.
\end_layout

\begin_layout Standard
The 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 filter is registered.
\end_layout

\begin_layout Subsection
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to register 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appfacelets{}
\end_layout

\end_inset

 with the project:
\end_layout

\begin_layout Enumerate
Double-click 
\series bold
faces-config.xml
\series default
.
\end_layout

\begin_layout Enumerate
Click the 
\series bold
Tree
\series default
 tab (along the bottom).
\end_layout

\begin_layout Enumerate
Click 
\series bold
Application
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
View-Handler
\series default
 to: 
\family typewriter
com.sun.facelets.FaceletViewHandler
\end_layout

\begin_layout Enumerate
Save the file.
\end_layout

\begin_layout Section
Create Web Pages
\end_layout

\begin_layout Standard
This section describes the steps to create a web page that uses 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

.
\end_layout

\begin_layout Subsection
Create Forwarding 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsp{}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Complete the following steps to create a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsp{}
\end_layout

\end_inset

 page that forwards to a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 page:
\end_layout

\begin_layout Enumerate
Right-click 
\series bold
WebContent
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
New » File
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
File name
\series default
 to: 
\family typewriter
index.jsp
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
.
\end_layout

\begin_layout Enumerate
Change 
\family typewriter
index.jsp
\family default
 as shown in 
\begin_inset CommandInset ref
LatexCommand ref
reference "alg:Forwarding-JSP"

\end_inset

:
\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset Float algorithm
wide false
sideways false
status collapsed

\begin_layout Plain Layout
\begin_inset Graphics
	filename source/jsf/index.jsp.png
	display false

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "alg:Forwarding-JSP"

\end_inset

Forwarding 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
appjsp{}
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\end_deeper
\begin_layout Subsection
Create 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 Page
\end_layout

\begin_layout Standard
Complete the following steps to create a 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 page:
\end_layout

\begin_layout Enumerate
Right-click 
\series bold
WebContent
\series default
.
\end_layout

\begin_layout Enumerate
Click 
\series bold
New » XHTML Page
\series default
.
\end_layout

\begin_layout Enumerate
Set 
\series bold
File name
\series default
 to: 
\family typewriter
index.xhtml
\end_layout

\begin_layout Enumerate
Click 
\series bold
Finish
\series default
.
\end_layout

\begin_layout Enumerate
Change 
\family typewriter
index.xhtml
\family default
 as shown in 
\begin_inset CommandInset ref
LatexCommand ref
reference "alg:-RichFaces-Source-Code"

\end_inset

:
\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset Float algorithm
wide false
sideways false
status collapsed

\begin_layout Plain Layout
\begin_inset Graphics
	filename source/xhtml/index.xhtml.png
	display false

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "alg:-RichFaces-Source-Code"

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 Source Code
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\end_deeper
\begin_layout Section
Run Application
\end_layout

\begin_layout Standard
Run the application as follows:
\end_layout

\begin_layout Enumerate
Close all tabs except 
\series bold
index.jsp
\series default
.
\end_layout

\begin_layout Enumerate
Click anywhere inside 
\series bold
index.jsp
\series default
 to give the tab focus.
\end_layout

\begin_layout Enumerate
Click 
\series bold
Run » Run
\series default
.
\end_layout

\begin_layout Enumerate
Launch a web browser.
\end_layout

\begin_layout Enumerate
Browse to: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
url{http://localhost:8080/
\backslash
dirjsfproject/}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 panel in 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:-RichFaces-Web-Page"

\end_inset

 is displayed.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status collapsed

\begin_layout Plain Layout
\begin_inset Graphics
	filename captures/richfaces-jboss-04.png
	display false

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:-RichFaces-Web-Page"

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
apprichfaces{}
\end_layout

\end_inset

 Web Page
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\end_body
\end_document