Sunday 28 February 2010

Beginning Java EE 6. Hand Holding Learning Trail Part 2. (JSF 2.0, Maven, Glassfish, Primefaces)

In the previous session we setup the skeleton of our simplea application.
In this installation, we will add a bit of Layout to the user interface before the next major atticle which
wil takle centralising Access control and security.

NB
This is only to beautify the look and feel. We will look at 'componentising' and taking advantage of
facelets in a future session. I actually dont feel easy just leaving it as this but in order not to be distracted
we will stay with this for now.

Lets get Rolling.


This is a continuation of a series. Please read the previous post to get a feel of what we are up to from here


TASK 1


Integrating 960 CSS framework.

As you may know, programmers are normally very bad at design and I am no exception. The 960 css framework is a grid framework that
allows you to position containers(divs) and other objects on your page very easily without having to worry about advanced CSS

It is a production ready open source CSS framework. Read More about it from here
So we will use that for our simplea application. I am hoping to create composite components for the 960 framework
later in this series.
OK, here we go.

1. In the src\main\webapp folder (this is a relative to the simplea folder), create

another folder called css.

2. Download the Zip version of 960 grid framework from here

3. Extract the ziped file into a folder.

4. In the code\css folder, copy the file 960.css and reset.css to the css folder created in step 1.

5. In the same folder ie code\css, create a file called styles.css

Enter the following in that file


6. Open the index.xhtml file created in the previous session and enter this



7. Create a package:

First cd into C:\home directory

Run setenv.bat

type setenv.bat and hit the enter key

Then cd into

then type


Now Start Glasfish by typing

then type


make sure previous version is uninstalled by typing

then type

then browse to

to see the application

You can now shutdown glassfish by typing

That brings us of the end of today's seesion.

Coming Up

Login and security in JSF 2.0. Stay tuned

No comments: