jsf-crud.war Introduction
NOTE: The delete functionality isn't working correctly in this application after you do a sort on the colums. Hopefully someone can help me figure out how to fix it.
The plan was for this to become a nice walk-through tutorial/lesson. Hopefully I'll get around to it. In the meantime, I think many will be able to get a lot out of this sample application. If there are things wrong with it, please let me know by e-mail. If you are new to JSF (as I am at the moment), please ask general JSF/MyFaces questions on the MyFaces mailing list. Unfortunately, I don't have a lot of time right now to answer JSF/MyFaces specific questions, plus you are better off getting answers from those much more knowledgable than myself.
Thanks to all those on the MyFaces and struts-users mailing list who helped with answering my many questions. (Not going to name specific names since I'd feel bad if I left someone out). Some of things this application demonstrates...
Requirements
This application requires an application server that implements the Servlet 2.4 and JavaServer Pages 2.0 specifications. The examples should all work on Tomcat 5.x (Discussed in next section). Please do not e-mail about getting your application to run on a server other than Tomcat. The source code (and an Ant build file) is provided for all the lessons so you should be able to build a war from the source and run it on you application server of choice.
Compiling/Building
I'm not a pro with Ant but the build script works even though I'm sure it could be re-written to be better.
ant build will build and deploy a war.
Note
The "real life" part of this application stops at the EmployeeService class. This tutorial isn't demonstrating how you would actually do the true persistence of your data. I happen to like iBATIS http://ibatis.apache.org/, but the point is you should be able to use any persistence framework you want. The EmployeeService class in this example is just a layer that would then call your persistence framework of choice, but in real life you'd want a more robust setup (Interfaces etc). The application is mainly to demonstrate JSF usage not persistence. This lesson just uses a static map to store stuff.
|