dear rlubke,
i'm a student trying to learn how to use JSF to build web application.
back in year 2002, i learned jsp with a Wrox book. i used JSP / tomcat / sqlserver 2000 database on windows.
all i had to do was add the jdk path to environment variables
and
add odbc jar files to the web-inf\lib folder
now i'm trying to learn JSF however i can't even get basic samples running.
I downloaded
apache tomcat 6.0.2-beta
apache ant 1.7.0
Windows Platform - Java(TM) SE Development Kit 6
JavaServer Faces Technology 1.2_03
I copied the jsf-api.jar and jsf-impl.jar to the tomcat lib folder.
java_home and path environment variables have been changed.
I bought the book "Core JavaServer Faces by david geary and cay horstmann" but it seems to be out of date or something. I think it was based off of an earlier JSF.
For an absolute newbie, what books should i buy? or what websites can I go to? to learn how to get the latest JSF 1.2 and tomcat 6.0 working?
> For an absolute newbie, what books should i buy? or
> what websites can I go to? to learn how to get the
> latest JSF 1.2 and tomcat 6.0 working?
Tomcat 6 is still somewhere between alfa and beta. On top of that the SUN RI JSF 1.2 implementation was not specifically build for interoperation with Tomcat. As such, you shouldn't expect to get it too work easily (frankly, at this moment you shouldn't expect to get it too work at all!).
If you insist on using Tomcat, you'd beter download the latest 5.5 release and combine that with the latest MyFaces JSF 1.1 release. The myfaces website has an easily to follow turtorial about getting JSF 1.1 to work.
On the other hand, if you want to use JSF 1.2, just download Glassfish. It already contains JSF, so there are no individual jars that need to be installed.
>On top of that the SUN RI JSF 1.2 implementation was not specifically build for >interoperation with Tomcat. As such, you shouldn't expect to get it too work >easily (frankly, at this moment you shouldn't expect to get it too work at all!).
I don't agree with this statement.
The 1.2 RI will work fine with a "compliant" Servlet 2.5/JSP 2.1 container. As Tomcat 6 isn't compliant with those specifications as of yet, one should expect to hit some issues, but I wouldn't say they are due to the RI - they are more due to the container.
Also note, that you can use the 1.2 RI with Tomcat 5.5 *if* you use Facelets as your view technology. You don't need to be tied to JSP.
I have the same problem running the JSF 1.2_03 examples. The best thing to do is just use the JSF 1.0 or 1.1 samples. They well run just fine. You also must include the jstl.jar and standard.jar files along with the jsf-api.jar and jsf-impl.jar files in the Tomcat common library. After that, restart Tomcat and run the examples.