Book "Java Server Faces 2.0"#

http://jsfatwork.irian.at

Maven#

Docu

1. Download V3.0.2 at http://maven.apache.org
2. Installation
3. Test

mvn --version
Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_23\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Maven URLS: Home Page | Downloads | Release Notes | Mailing Lists | Source Code | Issue Tracking | Wiki | Available Plugins

Create Project#

1. Create folder
2. Copy pom.xml
3. Create folder structure 4. Run

mvn clean install
mvn jetty:run-exploded
http://localhost:8080/mygourmet03/
mvn eclipse:eclipse -Dwtpversion=1.5
5. In Eclipse: Menu > Import Project > Import existing project ... 6. In Eclipse add repository folder as build path variable M2_REPO = C:\Users\<user>\.m2\repository

Templating#

<ui:composition>Wrapper to exclude all outside HTML
<ui:include src="leftpane.xhtml" />Put "src" into this place, use <ui:composition> in "src" to exclude not relevant content
<ui:insert name="body">A placeholder in the template, which will be filled with <ui:define name="body"> in the real page, use <ui:composition> in "real page" to exclude not relevant content