<s>
JSP	B-Architecture
Model	I-Architecture
2	I-Architecture
is	O
a	O
complex	O
design	O
pattern	O
used	O
in	O
the	O
design	O
of	O
Java	B-Language
Web	B-Application
applications	I-Application
which	O
separates	O
the	O
display	O
of	O
content	O
from	O
the	O
logic	O
used	O
to	O
obtain	O
and	O
manipulate	O
the	O
content	O
.	O
</s>
<s>
Since	O
Model	O
2	O
drives	O
a	O
separation	O
between	O
logic	O
and	O
display	O
,	O
it	O
is	O
usually	O
associated	O
with	O
the	O
model	O
–	O
view	O
–	O
controller	B-General_Concept
(	O
MVC	O
)	O
paradigm	O
.	O
</s>
<s>
The	O
Java	B-Language
BluePrints	I-Language
,	O
for	O
example	O
,	O
originally	O
recommended	O
using	O
EJBs	B-Language
to	O
encapsulate	O
the	O
MVC	O
Model	O
.	O
</s>
<s>
In	O
a	O
Model	O
2	O
application	O
,	O
requests	O
from	O
the	O
client	B-Protocol
browser	B-Application
are	O
passed	O
to	O
the	O
controller	B-General_Concept
.	O
</s>
<s>
The	O
controller	B-General_Concept
performs	O
any	O
logic	O
necessary	O
to	O
obtain	O
the	O
correct	O
content	O
for	O
display	O
.	O
</s>
<s>
It	O
then	O
places	O
the	O
content	O
in	O
the	O
request	O
(	O
commonly	O
in	O
the	O
form	O
of	O
a	O
JavaBean	O
or	O
POJO	B-General_Concept
)	O
and	O
decides	O
which	O
view	O
it	O
will	O
pass	O
the	O
request	O
to	O
.	O
</s>
<s>
The	O
view	O
then	O
renders	O
the	O
content	O
passed	O
by	O
the	O
controller	B-General_Concept
.	O
</s>
<s>
In	O
1998	O
,	O
Sun	O
Microsystems	O
published	O
a	O
pre-release	O
of	O
the	O
JavaServer	B-Language
Pages	I-Language
specification	O
,	O
version	O
0.92	O
.	O
</s>
<s>
The	O
first	O
model	O
(	O
referred	O
to	O
as	O
"	O
model	B-Architecture
1	I-Architecture
"	O
due	O
to	O
its	O
ordering	O
in	O
the	O
document	O
)	O
was	O
a	O
simplistic	O
model	O
whereby	O
JSP	O
pages	O
were	O
standalone	O
,	O
disjointed	O
entities	O
.	O
</s>
<s>
ColdFusion	B-Language
and	O
Active	B-General_Concept
Server	I-General_Concept
Pages	I-General_Concept
are	O
examples	O
of	O
contemporary	O
technologies	O
that	O
also	O
implemented	O
this	O
model	O
.	O
</s>
<s>
The	O
second	O
model	O
referred	O
to	O
by	O
the	O
document	O
(	O
"	O
model	O
2	O
"	O
in	O
the	O
ordering	O
)	O
was	O
an	O
improved	O
method	O
that	O
combined	O
servlet	B-Application
technology	O
with	O
JSP	O
technology	O
.	O
</s>
<s>
The	O
specific	O
difference	O
listed	O
was	O
that	O
a	O
servlet	B-Application
would	O
intercept	O
the	O
request	O
,	O
place	O
the	O
content	O
to	O
render	O
into	O
a	O
request	O
attribute	O
(	O
typically	O
represented	O
by	O
a	O
JavaBean	O
)	O
,	O
then	O
call	O
a	O
JSP	O
to	O
render	O
the	O
content	O
in	O
the	O
desired	O
output	O
format	O
.	O
</s>
<s>
All	O
of	O
the	O
logic	O
was	O
separated	O
out	O
into	O
a	O
servlet	B-Application
,	O
leaving	O
the	O
JSP	O
with	O
the	O
sole	O
responsibility	O
of	O
rendering	O
the	O
output	O
for	O
the	O
content	O
provided	O
.	O
</s>
<s>
In	O
December	O
1999	O
,	O
JavaWorld	O
published	O
an	O
article	O
by	O
Govind	O
Seshadri	O
entitled	O
Understanding	O
JavaServer	B-Language
Pages	I-Language
Model	O
2	O
architecture	O
.	O
</s>
<s>
The	O
second	O
milestone	O
was	O
the	O
claim	O
that	O
Model	O
2	O
provided	O
an	O
MVC	O
architecture	O
for	O
web-based	B-Application
software	O
.	O
</s>
<s>
Govind	O
believed	O
that	O
because	O
"	O
Model	O
2	O
"	O
architecture	O
separated	O
the	O
logic	O
out	O
of	O
the	O
JSP	O
and	O
placed	O
it	O
in	O
a	O
servlet	B-Application
,	O
the	O
two	O
pieces	O
could	O
be	O
seen	O
as	O
the	O
"	O
View	O
"	O
and	O
the	O
"	O
Controller	B-General_Concept
"	O
(	O
respectively	O
)	O
in	O
an	O
MVC	O
architecture	O
.	O
</s>
<s>
The	O
specific	O
example	O
used	O
in	O
the	O
article	O
was	O
a	O
Vector	B-Language
list	O
stored	O
in	O
the	O
user	O
's	O
session	O
.	O
</s>
<s>
In	O
March	O
2000	O
,	O
the	O
Apache	B-Language
Struts	I-Language
project	O
was	O
released	O
.	O
</s>
<s>
This	O
project	O
formalized	O
the	O
division	O
between	O
View	O
and	O
Controller	B-General_Concept
and	O
claimed	O
implementation	O
of	O
the	O
"	O
Model	O
2	O
"	O
pattern	O
.	O
</s>
<s>
Database	O
interaction	O
via	O
JDBC	B-Language
and	O
EJBs	B-Language
were	O
options	O
suggested	O
on	O
the	O
Struts	O
homepage	O
.	O
</s>
<s>
More	O
recently	O
,	O
Hibernate	B-Library
,	O
iBatis	B-Library
,	O
and	O
Object	B-Language
Relational	I-Language
Bridge	I-Language
were	O
listed	O
as	O
more	O
modern	O
options	O
that	O
could	O
be	O
used	O
for	O
a	O
model	O
.	O
</s>
<s>
However	O
,	O
the	O
Java	B-Language
BluePrints	I-Language
specifically	O
warn	O
against	O
this	O
interpretation	O
:	O
</s>
<s>
The	O
literature	O
on	O
Web-tier	O
technology	O
in	O
the	O
J2EE	O
platform	O
frequently	O
uses	O
the	O
terms	O
"	O
Model	B-Architecture
1	I-Architecture
"	O
and	O
"	O
Model	O
2	O
"	O
without	O
explanation	O
.	O
</s>
<s>
Model	B-Architecture
1	I-Architecture
and	O
Model	O
2	O
simply	O
refer	O
to	O
the	O
absence	O
or	O
presence	O
(	O
respectively	O
)	O
of	O
a	O
controller	B-General_Concept
servlet	B-Application
that	O
dispatches	O
requests	O
from	O
the	O
client	B-Protocol
tier	O
and	O
selects	O
views	O
.	O
</s>
<s>
The	O
confusion	O
over	O
the	O
term	O
"	O
MVC2	O
"	O
has	O
led	O
to	O
additional	O
confusion	O
over	O
Model	B-Architecture
1	I-Architecture
code	O
,	O
resulting	O
in	O
common	O
usage	O
of	O
the	O
nonexistent	O
term	O
"	O
MVC1	O
"	O
.	O
</s>
