Monday, September 3, 2007

Getting started with JSF 1.2 & Tomcat 6

I wanted to start dabbling with JSF and the latest JDK and Tomcat versions. I have an idea for a website that I want to create. To gain skills and knowledge in JSF seems valuable to me.

I had seen that myfaces 1.2 came out and tried to get it working but ran into some JSTL tag issues. Roseindia.net gives a tutorial on how to get Tomcat 6 and jsf 1.2 running together.

Basic downloads to get started
Java JDK 1.6 http://java.sun.com/javase/downloads/index.jsp
Eclipse http://www.eclipse.org
Tomcat 6 http://tomcat.apache.org/download-60.cgi
Sysdeo Pluginhttp://www.eclipsetotale.com/tomcatPlugin.html
This plugin allows you to start and stop tomcat from within Eclipse which is a feature I like.

Proof that you can run jsf 1.2 on Tomcat 6
http://www.roseindia.net/jsf/jsf1.2/jsf-1.2-tomcat-6.shtml



An excellent book that I am starting to go through the examples
is Core JavaServer Faces by Geary & Horstmann.

I successfully got the first example to run properly, something that I was
not able to do with the latest myfaces 1.2 and Tomcat 6.

Example code from the book can be found at
www.corejsf.com


Earlier this year, I built a website using myfaces 1.1 and Tomcat 5. That was nice but jsf 1.2 is the more current version and I want to migrate towards that.

Now that I have it set up, I can start working in JSF 1.2 and all that it
offers.

I did try and set up the Chapter 8 Tiles examples from corejsf.com and ran into some JSTL tag issues.

The following link helped resolve that
http://groups.google.com/group/javaee5/web/setup-enironment-tomcat-6-jsf-1-2-jstl-1-2

1 comment:

ChrisWebster said...

Hi I'm trying the same thing, I've got it all working but I've hit something of an issue, have you tried using a selectManyMenu bound to a value in a backing bean using f:selectItems? when I hit submit on my form it blows away the contents of my menu! It doesn't happen if you set up the jsp/f page using f:selectItem only binding through selectItems