Example 2: Java Server Faces

This web site is made with Java Server Faces. The web site itself is the example.

The following elements benefit from Java Server Faces:

  • The frame (stylistic elements on the left, encoded e-mail address, flags for choosing the language) have to be defined only once.
  • The menu is generated by JSF. A new menu entry only needs to be inserted at a single place in the code, and then it is visible on six pages in three languages.
  • The localisation, i. e. three versions for German, French and English, is effected by JSF instruments.
  • The table of my knowledge is generated by JSF. The durations of the experiences are calculated using the actual date.

I admit I've cheated a bit. My web service provider does not offer a possibility to use a Java server. That's not a big deal because the pages are mostly static (with the exception of the durations of the experiences in the table of my knowledge, which depend of the actual date of the server, but even here the dynamic aspect is very limited). Instead JSF runs on my computer, and I read all possible variations with this script

cd $(dirname $0)
PROJECT=$(basename $(pwd))
cd web
wget --header=Accept-Language:de -O index.html "http://localhost:8080/$PROJECT/_jsf/index.jsf?dir=/"
for LANGUAGE in de fr en
do
  for FILE in $LANGUAGE/*.html
  do
    wget --header=Accept-Language:$LANGUAGE -O "$FILE" "http://localhost:8080/$PROJECT/_jsf/$(basename $FILE .html).jsf"
  done
done
and put them statically on the server of my service provider.

© IT-Beratung Kuhlmann GmbH