First RichFaces application on Netbeans 6

As part of almost sadomasochistic effort vocational software developer have, I'm doing a brief introduction to developing with RichFaces, from new IDE installation until minimal working application. The aim is not doing a tutorial, neither howto nor step by step (if you're reading this I suppose you don't want anybody to tell you to press 'next').

I've recently installed Red Hat Developer Studio beta 1, but I think it's still interesting using Richfaces on other IDEs so you don't have to switch between environments.

1.- Download last version of NetBeans 6 M10.
2.- Download last builds of RichFaces and Ajax4JSF, including sources (it contains javadoc and allows you to debug). They're merging soon in one only project.

**I'm using unstable versions because I'm at home, don't tell your boss to do this if you don't want to be fired ;).

3.- During the 180MB download you'd take a look at Richfaces and Ajax4JSF developer guides.

4.- Launch installer. Just some notes during the installation:

  • Tell installer to configure Tomcat 6.
  • Change default passwords and ports and write them down.
5.- Open Netbeans and create a new Web project running on recently installed SJSAS 9. Activate JSF.
6.- Press F6 for running the server, deploying and opening a browser. It should show 'JavaServer Faces' inside an html H1 element.

7.- Untar RichFaces, which contains both Ajax4JSF and RichFaces.
8.- Create a new library with those jars and add it to the project: project properties --> libraries --> add --> manage --> new library. Add both binary jars and sources.
9.- Apply the needed changes for a Richfaces application: add web.xml configuration and richfaces taglib.
10.- Restart application server. During the boot you could say hello at Richfaces users forum. You're going to use it very much, and Richfaces developers have been infinitely patient with me :). I had never seen such a good support in an OpenSource project.

11.- Ooops, first error! NoClassDefFound because of absence of Commons Logging, del que depende. You must add the following libraries:
  • commons-logging (bundled with Netbeansincluída con NetBeans)
  • commons-digester (download)
  • commons-collections (download)
  • commons-beanutils (download)
12.- Restart the server and ¡voila!

Nothing spectacular, but it'a a beginning.