If you want to run this tutorial in a JavaEE/J2EE environment, we recommend JBoss 4.2.0 and up.
You can download JBoss 4.2.0 from here
Once you have downloaded the
. You then unzip that file to a directory of your choice. This tutorial will assume you
have unzipped the JBoss 4.2.0 into the C:\JBoss4.2.0
In the C:\JBoss4.2.0\bin
directory you will find a file called run.bat
file. We can use that later
to actually start JBoss and to see the tutorial in action.
Project Directory Structure
The following is a basic directory structure and contents of a gracelet war.
Since JBoss AS allows you to use what are called expanded war's, you can actually create
the above structure in a sub directory ending in .war
of the server deploy directory.
You can also download a zip file that contains this basic structure from the gracelet download
. The zip is called clean-war-2.0.0.SP2.zip. If you download
it and extract it in the deploy dir (C:\JBoss4.2.0\server\default\deploy
) you should see a directory called clean.war
in the deploy directory.
Please see the Introduction : Getting Setup
for what you
need in your web.xml
files. The clean war zip comes with the basic
If you created the above structure yourself (instead of downloading the clean war zip)
you can open up the index.groovy
file and put the following code in it:
Now you should be able to start JBoss by doing the following:
If you do not configure it otherwise, JBoss will use the first part of your
war directory as the name, so like if you used the clean war zip the war directory
would be called clean.war
. That would make clean
the web context root
path. The web server would default to localhost and port 8080. Thus you should be able
to open up the page by going to http://localhost:8080/clean/index.jsf
You should see a page that says:
http://localhost:8080/clean/index.jsf - Mozilla Firefox
This is a new gracelet project