<s>
Java	B-Language
view	O
technologies	O
and	O
frameworks	O
are	O
web-based	B-Application
software	B-Library
libraries	I-Library
that	O
provide	O
the	O
user	B-Application
interface	I-Application
,	O
or	O
"	O
view-layer	O
"	O
,	O
of	O
Java	B-Language
web	B-Application
applications	I-Application
.	O
</s>
<s>
Such	O
application	B-Application
frameworks	I-Application
are	O
used	O
for	O
defining	O
web	O
pages	O
and	O
handling	O
the	O
HTTP	B-Protocol
requests	I-Protocol
(	O
clicks	O
)	O
generated	O
by	O
those	O
web	O
pages	O
.	O
</s>
<s>
As	O
a	O
sub-category	O
of	O
web	B-Application
frameworks	I-Application
,	O
view-layer	O
frameworks	O
often	O
overlap	O
to	O
varying	O
degrees	O
with	O
web	B-Application
frameworks	I-Application
that	O
provide	O
other	O
functionality	O
for	O
Java	B-Language
web	B-Application
applications	I-Application
.	O
</s>
<s>
Java	B-Language
view-layer	O
frameworks	O
often	O
claim	O
to	O
support	O
some	O
or	O
all	O
of	O
the	O
model	O
–	O
view	O
–	O
controller	O
design	O
pattern	O
.	O
</s>
<s>
Jakarta	B-Language
Faces	I-Language
(	O
JSF	O
)	O
,	O
Apache	B-Language
Tapestry	I-Language
and	O
Apache	B-Language
Wicket	I-Language
are	O
competing	O
component-based	O
technologies	O
,	O
abstracting	O
the	O
stateless	B-Protocol
HTTP	B-Protocol
request-response	O
cycle	O
and	O
the	O
Jakarta	B-Application
Servlet	I-Application
API	B-General_Concept
behind	O
an	O
object-oriented	B-Language
,	O
event-driven	O
component	O
model	O
.	O
</s>
<s>
In	O
contrast	O
,	O
Struts	O
and	O
the	O
Spring	B-Application
MVC	I-Application
Framework	I-Application
are	O
action-oriented	O
frameworks	O
that	O
provide	O
a	O
thinner	O
abstraction	B-Architecture
layer	I-Architecture
over	O
the	O
servlet	B-Application
API	B-General_Concept
.	O
</s>
<s>
Apache	B-Language
Tiles	I-Language
is	O
a	O
templating	O
framework	O
designed	O
to	O
work	O
with	O
Struts	O
.	O
</s>
<s>
Facelets	B-Language
is	O
a	O
view	O
definition	O
and	O
templating	O
technology	O
designed	O
to	O
work	O
with	O
JSF	O
.	O
</s>
<s>
SiteMesh	O
can	O
be	O
used	O
with	O
any	O
Jakarta	B-Language
Pages	I-Language
(	O
JSP	O
)	O
.	O
</s>
<s>
Facelets	B-Language
,	O
Tapestry	B-Language
and	O
Wicket	B-Language
have	O
their	O
own	O
templating	O
approaches	O
based	O
on	O
HTML/XHTML	O
.	O
</s>
<s>
Apache	B-Language
Click	I-Language
uses	O
HTML	B-Language
based	O
Apache	B-Language
Velocity	I-Language
templates	O
and	O
plain	B-Language
old	I-Language
Java	I-Language
objects	I-Language
(	O
POJOs	O
)	O
,	O
with	O
JSP	O
optional	O
.	O
</s>
<s>
The	O
Servlet	B-Application
API	B-General_Concept
is	O
the	O
foundation	O
of	O
almost	O
all	O
Java	B-Language
Web	O
View	O
technologies	O
.	O
</s>
<s>
Servlet	B-Application
provides	O
the	O
basic	O
mechanism	O
for	O
writing	O
Java	B-Language
classes	O
for	O
web	B-Application
applications	I-Application
.	O
</s>
<s>
Servlets	B-Application
can	O
respond	O
to	O
HTTP	B-Protocol
requests	I-Protocol
,	O
create	O
cookies	O
and	O
maintain	O
sessions	O
.	O
</s>
<s>
Built	O
on	O
top	O
of	O
the	O
Servlet	B-Application
API	B-General_Concept
,	O
JSP	O
provides	O
a	O
document-centric	O
,	O
tag-based	O
templates	O
,	O
server	O
programming	O
model	O
which	O
can	O
generate	O
many	O
forms	O
of	O
textual	O
content	O
.	O
</s>
<s>
Java	B-Language
code	I-Language
may	O
be	O
embedded	O
in	O
JSP	B-Language
files	I-Language
and	O
is	O
compiled	O
and	O
executed	O
when	O
a	O
request	O
is	O
received	O
.	O
</s>
<s>
Struts	O
provides	O
for	O
a	O
decoupling	B-Application
of	O
the	O
Controller	O
and	O
the	O
View	O
.	O
</s>
<s>
Requests	O
are	O
received	O
by	O
a	O
Java	B-Language
Class	O
(	O
Controller	O
)	O
which	O
can	O
decide	O
which	O
View	O
to	O
display	O
.	O
</s>
<s>
The	O
actual	O
View	O
can	O
be	O
written	O
in	O
different	O
view	O
technologies	O
,	O
like	O
JSP	O
,	O
free	O
marker	O
template	O
,	O
velocity	B-Language
template	O
etc	O
.	O
</s>
<s>
An	O
XML	O
configuration	B-Protocol
file	I-Protocol
is	O
used	O
to	O
specify	O
the	O
"	O
Page	O
Navigation	O
"	O
,	O
i.e.	O
</s>
<s>
Compared	O
to	O
JSPs	O
,	O
enforces	O
a	O
clear	O
separation	O
of	O
HTML	B-General_Concept
markup	I-General_Concept
and	O
Java	B-Language
code	I-Language
.	O
</s>
<s>
Uses	O
the	O
Post/Redirect/Get	B-Application
navigation	O
pattern	O
for	O
form	O
submission	O
.	O
</s>
<s>
This	O
is	O
an	O
HTML	B-Language
templating	O
framework	O
based	O
on	O
the	O
composite	O
pattern	O
.	O
</s>
<s>
It	O
allows	O
for	O
the	O
HTML	B-Language
page	O
to	O
be	O
broken	O
up	O
into	O
multiple	O
"	O
pagelets	O
"	O
,	O
called	O
Templates	O
,	O
Definitions	O
and	O
Composing	O
pages	O
.	O
</s>
<s>
At	B-Library
runtime	I-Library
the	O
pagelets	O
are	O
stitched	O
together	O
to	O
generate	O
the	O
final	O
HTML	B-Language
.	O
</s>
<s>
Pages	O
directly	O
interact	O
with	O
stateful	O
Java	B-Language
components	O
on	O
the	O
server	O
.	O
</s>
<s>
Components	O
and	O
their	O
state	O
are	O
managed	O
by	O
the	O
Wicket	B-Language
framework	I-Language
,	O
freeing	O
the	O
application	O
developer	O
from	O
having	O
to	O
use	O
HttpSession	O
directly	O
to	O
manage	O
state	O
.	O
</s>
<s>
Compared	O
to	O
JSPs	O
,	O
enforces	O
a	O
clear	O
separation	O
of	O
HTML	B-General_Concept
markup	I-General_Concept
and	O
Java	B-Language
code	I-Language
.	O
</s>
<s>
Web	O
page	O
components	O
are	O
'	O
pushed	O
 '	O
into	O
the	O
HTML	B-General_Concept
markup	I-General_Concept
from	O
the	O
code	O
.	O
</s>
<s>
Typically	O
uses	O
Facelets	B-Language
for	O
XML/XHTML	O
-based	O
templating	O
.	O
</s>
<s>
Classes	O
are	O
written	O
as	O
POJOs	O
,	O
with	O
Annotations	O
or	O
XML	O
configuration	B-Protocol
files	I-Protocol
used	O
to	O
associate	O
them	O
with	O
page	O
and	O
component	O
templates	O
.	O
</s>
<s>
The	O
Unified	B-Language
Expression	I-Language
Language	I-Language
allows	O
binding	O
component	O
fields	O
and	O
events	O
to	O
POJO	B-Language
bean	O
properties	O
and	O
methods	O
.	O
</s>
<s>
Conversion	O
and	O
validation	O
constraints	O
can	O
be	O
specified	O
in	O
Facelets	B-Language
and	O
are	O
automatically	O
applied	O
,	O
normally	O
resulting	O
in	O
reposting	O
of	O
the	O
same	O
page	O
with	O
error	O
information	O
in	O
case	O
of	O
failure	O
.	O
</s>
<s>
Navigation	O
can	O
be	O
via	O
configuration	B-Protocol
file	I-Protocol
rules	O
or	O
directly	O
specified	O
in	O
the	O
page	O
.	O
</s>
<s>
Can	O
transparently	O
support	O
Ajax	B-General_Concept
.	O
</s>
<s>
SiteMesh	O
is	O
an	O
HTML	B-Language
templating	O
framework	O
based	O
on	O
the	O
"	O
Decoration	O
"	O
model	O
.	O
</s>
<s>
It	O
allows	O
for	O
the	O
creation	O
of	O
a	O
'	O
decoration	O
 '	O
template	O
which	O
is	O
then	O
applied	O
to	O
any	O
other	O
HTML	B-Language
to	O
generate	O
a	O
new	O
HTML	B-Language
.	O
</s>
<s>
The	O
newly	O
generated	O
HTML	B-Language
contains	O
elements	O
from	O
the	O
original	O
HTML	B-Language
blended	O
into	O
the	O
template	O
.	O
</s>
<s>
This	O
allows	O
for	O
the	O
original	O
HTML	B-Language
to	O
be	O
very	O
simple	O
and	O
devoid	O
of	O
any	O
formatting	O
or	O
layout	O
specification	O
.	O
</s>
<s>
Blending	O
the	O
two	O
allows	O
for	O
a	O
consistent	O
look	B-Application
and	I-Application
feel	I-Application
for	O
all	O
web	O
pages	O
.	O
</s>
<s>
It	O
runs	O
on	O
an	O
embedded	O
Jetty	B-Language
web	O
server	O
by	O
default	O
,	O
but	O
can	O
be	O
configured	O
to	O
run	O
on	O
other	O
webservers	O
.	O
</s>
