|
Integrating JSF, Spring and Hibernate |
|
Presentation Layer
JSF is used to build the presentation layer of
the application. JFS allows us to create rich
GUI for web application. It resolves the
technical challenges of creating rich GUI web
application. In this layer we have JSP pages
consists of JSF components. All the requests
to the web server pass through FacesServlet.
Business Layer
The POJO classes and classes to process the
business logic are used to create the Business
Layer. The POJO classes, with the help of spring
framework, create an ideal solution to implement
the Business Layer.
Data Access Layer
The data access layer handles all the logic to
save and retrieve the data from database.
Hibernate O/R mapping tools is an ideal solution
for enterprise application of any size. Hibernate
handles all the logic to store and retrieve POJO
objects. It also handles resource management
and transaction management activities.
|
|
3. Downloading MyFaces and creating web
application
Downloading MyFaces
MyFaces can be configured using libraries and
configuration files which come with the
example applications. The latest version of
MyFaces can be downloaded from http://
myfaces.apache.org/download.html. We have
downloaded tomahawk-examples-1.1.6-
bin.zip from http://www.apache.org/dyn/
closer.cgi/myfaces/binaries/tomahawkexamples-
1.1.6-bin.zip for this example
tutorial. The downloaded file will be a zip file
named tomahawk-examples-1.1.6-bin.zip.
Extract the zip file and you will get 4 war files.
Copy myfaces-example-simple-1.1.6.war file
in the webapps directory of Tomcat which
will automatically be expanded in the directory
of same name. Now we will use the libraries
and configuration files from the exploded
application to create our web application.
Creating web application
Web application follows the start directory
structure as defined in the JEE (J2EE)
specification. Here we are creating the application
in the exploded format, you can also create
archive (war, ear) and then deploy on the
application server.
Following image shows the directory structure
of our web application.
|
|
|
Jan
2008 | Java Jazz Up | 54 |
|
|
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 |
|
|
|
|
|
|
|
|
|