Tag Archives: JSF + Spring + Hibernate

Running Appfuse demo ‘tutorial-jsf’

Appfuse JSF war didn’t work. It drove me crazy !!

I wanted the working versions of http://demo.appfuse.org/ . But i couldn’t get through.

Then I found http://code.google.com/p/appfuse-demos/ . I downloaded the ‘appfuse-demos-2.0.2.tar.gz’ . I was working on windows XP. I extracted the files through WinRAR and found different demo apps as shown in the live demo are organized in different folders. They are…

helloworld
struts2-crud
tutorial-hibernate
tutorial-ibatis
tutorial-jpa
tutorial-jsf
tutorial-service
tutorial-spring
tutorial-struts2
tutorial-tapestry
I chose ‘tutorial-jsf’. It is combined with JSF-Spring-Hibernate-ACEGI. All the things, that I was looking for.
I use Eclipse 3.4.2 as my working IDE. So I headed for http://appfuse.org/display/APF/Eclipse to make it work in my workbanch.
I extracted the ‘tutorial-jsf’ folder from ‘appfuse-demos-2.0.2.tar.gz’ and got into that folder through command prompt.
It is not a eclipse project. So, I had make it in such a way that I can Import it in my eclipse workspace and develop it further.
I ran the command ‘ mvn eclipse:eclipse ‘ .
Maven downloaded hell a lot of dependencies and took pretty much time. After a while it was ready to Import in eclipse.
I launched Eclipse and went to File > Import > Existing Projects into Workspace (under the General category). Selected the ‘tutorial-jsf’ directory and Clicked Finish to complete the process.
Now, tutorial-jsf is finally is in my workspace.
Now all I need is to run it. I had tomcat 6 in my eclipse. But it was unable to run it. So i looked into the above mentioned tutorial and found that it will run in Jetty WebServer.
I ran the command ‘mvn jetty:run-war‘, in the ‘tutorial-jsf’ directory from the Command Prompt.
It took a while for running for the first time and finally it was running.
I loved to see its running in my machine.
Now, I need to find a way to run it in tomcat and make some changes.

Heading for Appfuse

I was assigned to develop a solution to manage customer applications.

I could have done it with simple solution with php on a simple cms.

But in past few year I worked in J2EE solutions. So headed for that.

But the problem is, when I worked on J2EE projects my seniors provided me the already structured Skeleton. What I didn’t have with me in my new workplace.

I have experienced with JSF, Spring and Hibernate.

So I wanted a skeleton with these three. Along with user management, session management and ready to use JSF-Spring-Hibernate  configuration. I studied and found that it will really painful job to connect them all, if I don’t have any previous experience doing that. Moreover, I will never know, if have done it perfectly and there is no one to check it. Do, I headed for Appfuse ( http://appfuse.org/ ). I was looking for some demo it can use it. I found http://demo.appfuse.org/ . There were four choices. They are –

* JSF + Spring + Hibernate
* Struts 2 + Spring + Hibernate
* Spring MVC + Spring + Hibernate
* Tapestry + Spring + Hibernate

As u can assume, I picked “JSF + Spring + Hibernate”. After spending some time I found that, It was really that, what I was looking for. It has JSF, Spring, Hibernate and ACEGI security already configured and ready to use stage. Now, just i want, to get the source code along with the dependency jars, and the hell working it out.

So I have started work on it, got some awesome facilities with some problem. I will share it on future.