Magazine
 
Integrating JSF, Spring and Hibernate
 

<from-view-id>/pages/registration.jsp</
from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/pages/welcome.jsp
</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/pages/registration.jsp
</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

Note: In the next sections we will add the configuration into web.xml and facesconfig. xml files, so the content will change. We advice you to download the full code from our site and then take the files from there.

7. Create “src” directory parallel to the “lib” directory.

8. Create two directories “classes”, “java” and “build.xml” file within “src” folder. Copy the following content into build.xml file:

<project name=”MyFaces, Hibernate and
Spring Integration” basedir=”../”
default=”all”>
<!— Project settings —>
<property name=”project.title”
value=”RoseIndia MyFaces, Hibernate and
Spring Integration Tutorial”/>
<property name=”project.jar.file”
value=”roseindia.jar”/>
<path id=”class.path”>
<fileset dir=”lib”>
<include name=”**/*.jar”/>
</fileset>
<fileset dir=”libext”>
<include name=”**/*.jar”/>
</fileset>
</path>
<!— Classpath for Project —>
<path id=”compile.classpath”>
<pathelement path =”lib/myfaces-api-
1.1.5.jar”/>
<pathelement path =”lib/myfaces-impl-

 

1.1.5.jar”/>
<pathelement path =”lib/jstl-1.1.0.jar”/
>
<pathelement path =”lib/tomahawk-
1.1.6.jar”/>
<pathelement path =”libext/servletapi.
jar”/>
<pathelement path =”classes”/>
<pathelement path =”${classpath}”/>
</path>
<!— Check timestamp on files —>
<target name=”prepare”>
<tstamp/>
</target>
<!— Copy any resource or configuration
files —>
<target name=”resources”>
<copy todir=”src/classes”
includeEmptyDirs=”no”>
<fileset dir=”src/java”>
<patternset>
<include name=”**/*.conf”/>
<include name=”**/*.properties”/>
<include name=”**/*.xml”/>
</patternset>
</fileset>
</copy>
</target>
<!— Normal build of application —>
<target name=”compile”
depends=”prepare,resources”>
<javac srcdir=”src” destdir=”src/
classes” debug=”true”
debuglevel=”lines,vars,source”>
<classpath refid=”class.path”/>
</javac>
<jar jarfile=”lib/${project.jar.file}”
basedir=”src/classes”/>
</target>
<!— Remove classes directory for clean
build —>
<target name=”clean”
description=”Prepare for clean build”>
<delete dir=”classes”/>
<mkdir dir=”classes”/>
</target>
<!— Build Javadoc documentation —>
<target name=”javadoc”

Jan 2008 | Java Jazz Up | 57
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 ,

83, 84 , 85 , 86, 87 , 88, 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103, 104 , 105 ,

106, 107,

Download PDF