<s>
Jakarta	B-Language
Server	I-Language
Pages	I-Language
(	O
JSP	O
;	O
formerly	O
JavaServer	B-Language
Pages	I-Language
)	O
is	O
a	O
collection	O
of	O
technologies	O
that	O
helps	O
software	B-Application
developers	I-Application
create	O
dynamically	O
generated	O
web	O
pages	O
based	O
on	O
HTML	B-Language
,	O
XML	B-Protocol
,	O
SOAP	B-Application
,	O
or	O
other	O
document	O
types	O
.	O
</s>
<s>
Released	O
in	O
1999	O
by	O
Sun	O
Microsystems	O
,	O
JSP	O
is	O
similar	O
to	O
PHP	B-Application
and	O
ASP	B-General_Concept
,	O
but	O
uses	O
the	O
Java	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
To	O
deploy	O
and	O
run	O
Jakarta	B-Language
Server	I-Language
Pages	I-Language
,	O
a	O
compatible	O
web	O
server	O
with	O
a	O
servlet	B-Language
container	I-Language
,	O
such	O
as	O
Apache	B-Language
Tomcat	I-Language
or	O
Jetty	B-Language
,	O
is	O
required	O
.	O
</s>
<s>
Architecturally	O
,	O
JSP	O
may	O
be	O
viewed	O
as	O
a	O
high-level	O
abstraction	B-Application
of	O
Java	B-Application
servlets	I-Application
.	O
</s>
<s>
JSPs	O
are	O
translated	O
into	O
servlets	B-Application
at	O
runtime	O
,	O
therefore	O
JSP	O
is	O
a	O
Servlet	B-Application
;	O
each	O
JSP	O
servlet	B-Application
is	O
cached	O
and	O
re-used	O
until	O
the	O
original	O
JSP	O
is	O
modified	O
.	O
</s>
<s>
Jakarta	B-Language
Server	I-Language
Pages	I-Language
can	O
be	O
used	O
independently	O
or	O
as	O
the	O
view	O
component	O
of	O
a	O
server-side	O
model	O
–	O
view	O
–	O
controller	O
design	O
,	O
normally	O
with	O
JavaBeans	O
as	O
the	O
model	O
and	O
Java	B-Application
servlets	I-Application
(	O
or	O
a	O
framework	O
such	O
as	O
Apache	B-Language
Struts	I-Language
)	O
as	O
the	O
controller	O
.	O
</s>
<s>
This	O
is	O
a	O
type	O
of	O
Model	B-Architecture
2	I-Architecture
architecture	O
.	O
</s>
<s>
JSP	O
allows	O
Java	B-Language
code	I-Language
and	O
certain	O
predefined	O
actions	O
to	O
be	O
interleaved	O
with	O
static	O
web	O
markup	O
content	O
,	O
such	O
as	O
HTML	B-Language
.	O
</s>
<s>
The	O
compiled	O
pages	O
,	O
as	O
well	O
as	O
any	O
dependent	O
Java	B-Language
libraries	O
,	O
contain	O
Java	B-Language
bytecode	O
rather	O
than	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
Like	O
any	O
other	O
.jar	O
or	O
Java	B-Language
program	O
,	O
code	O
must	O
be	O
executed	O
within	O
a	O
Java	B-Language
virtual	I-Language
machine	I-Language
(	O
JVM	B-Language
)	O
that	O
interacts	O
with	O
the	O
server	O
's	O
host	O
operating	B-General_Concept
system	I-General_Concept
to	O
provide	O
an	O
abstract	O
,	O
platform-neutral	O
environment	O
.	O
</s>
<s>
JSPs	O
are	O
usually	O
used	O
to	O
deliver	O
HTML	B-Language
and	O
XML	B-Protocol
documents	I-Protocol
,	O
but	O
through	O
the	O
use	O
of	O
OutputStream	O
,	O
they	O
can	O
deliver	O
other	O
types	O
of	O
data	O
as	O
well	O
.	O
</s>
<s>
The	O
Web	B-Language
container	I-Language
creates	O
JSP	O
implicit	O
objects	O
like	O
request	O
,	O
response	O
,	O
session	O
,	O
application	O
,	O
config	O
,	O
page	O
,	O
pageContext	O
,	O
out	O
and	O
exception	O
.	O
</s>
<s>
JSP	B-Language
Engine	I-Language
creates	O
these	O
objects	O
during	O
translation	O
phase	O
.	O
</s>
<s>
JSP	O
pages	O
use	O
several	O
delimiters	O
for	O
scripting	B-Language
functions	O
.	O
</s>
<s>
A	O
scriptlet	O
is	O
a	O
fragment	O
of	O
Java	B-Language
code	I-Language
that	O
runs	O
when	O
the	O
user	O
requests	O
the	O
page	O
.	O
</s>
<s>
Java	B-Language
code	I-Language
is	O
not	O
required	O
to	O
be	O
complete	O
or	O
self-contained	O
within	O
a	O
single	O
scriptlet	O
block	O
.	O
</s>
<s>
For	O
example	O
,	O
any	O
Java	B-Language
if/for/while	O
blocks	O
opened	O
in	O
one	O
scriptlet	O
must	O
be	O
correctly	O
closed	O
in	O
a	O
later	O
scriptlet	O
for	O
the	O
page	O
to	O
successfully	O
compile	O
.	O
</s>
<s>
Content	O
that	O
falls	O
inside	O
a	O
split	O
block	O
of	O
Java	B-Language
code	I-Language
(	O
spanning	O
multiple	O
scriptlets	O
)	O
is	O
subject	O
to	O
that	O
code	O
.	O
</s>
<s>
The	O
following	O
would	O
be	O
a	O
valid	O
for	B-Language
loop	I-Language
in	O
a	O
JSP	O
page	O
:	O
</s>
<s>
Version	O
2.0	O
of	O
the	O
JSP	O
specification	O
added	O
support	O
for	O
the	O
Expression	O
Language	O
(	O
EL	O
)	O
,	O
used	O
to	O
access	O
data	O
and	O
functions	O
in	O
Java	B-Language
objects	O
.	O
</s>
<s>
In	O
JSP	O
2.1	O
,	O
it	O
was	O
folded	O
into	O
the	O
Unified	B-Language
Expression	I-Language
Language	I-Language
,	O
which	O
is	O
also	O
used	O
in	O
JavaServer	B-Language
Faces	I-Language
.	O
</s>
<s>
One	O
such	O
library	O
is	O
the	O
JSTL	B-Language
,	O
with	O
support	O
for	O
common	O
tasks	O
such	O
as	O
iteration	O
and	O
conditionals	O
(	O
the	O
equivalent	O
of	O
"	O
for	O
"	O
and	O
"	O
if	O
"	O
statements	O
in	O
Java	B-Language
)	O
.	O
</s>
<s>
JSP	O
pages	O
may	O
also	O
be	O
written	O
in	O
fully	O
valid	O
XML	B-Protocol
syntax	O
.	O
</s>
<s>
Such	O
JSP	B-Language
files	I-Language
commonly	O
use	O
the	O
alternative	O
.jspx	O
file	B-Operating_System
extension	O
,	O
which	O
usually	O
causes	O
the	O
application	B-Application
server	I-Application
to	O
validate	O
the	O
XML	B-Protocol
syntax	O
.	O
</s>
<s>
Since	O
the	O
usual	O
JSP	O
syntax	O
<% ... %>	O
is	O
not	O
valid	O
in	O
XML	B-Protocol
,	O
a	O
developer	B-Application
must	O
use	O
alternative	O
tags	O
provided	O
by	O
JSP	O
.	O
</s>
<s>
A	O
JavaServer	B-Language
Pages	I-Language
compiler	O
is	O
a	O
program	O
that	O
parses	O
JSPs	O
,	O
and	O
transforms	O
them	O
into	O
executable	O
Java	B-Application
Servlets	I-Application
.	O
</s>
<s>
A	O
program	O
of	O
this	O
type	O
is	O
usually	O
embedded	O
into	O
the	O
application	B-Application
server	I-Application
and	O
run	O
automatically	O
the	O
first	O
time	O
a	O
JSP	O
is	O
accessed	O
,	O
but	O
pages	O
may	O
also	O
be	O
precompiled	O
for	O
better	O
performance	O
,	O
or	O
compiled	O
as	O
a	O
part	O
of	O
the	O
build	O
process	O
to	O
test	O
for	O
errors	O
.	O
</s>
<s>
Some	O
JSP	B-Language
containers	I-Language
support	O
configuring	O
how	O
often	O
the	O
container	O
checks	O
JSP	O
file	B-Operating_System
timestamps	O
to	O
see	O
whether	O
the	O
page	O
has	O
changed	O
.	O
</s>
<s>
Typically	O
,	O
this	O
timestamp	O
would	O
be	O
set	O
to	O
a	O
short	O
interval	O
(	O
perhaps	O
seconds	O
)	O
during	O
software	O
development	O
,	O
and	O
a	O
longer	O
interval	O
(	O
perhaps	O
minutes	O
,	O
or	O
even	O
never	O
)	O
for	O
a	O
deployed	O
Web	B-Application
application	I-Application
.	O
</s>
<s>
In	O
2000	O
,	O
Jason	O
Hunter	O
,	O
author	O
of	O
"	O
Java	B-Application
Servlet	I-Application
Programming	O
"	O
described	O
a	O
number	O
of	O
"	O
problems	O
"	O
with	O
JavaServer	B-Language
Pages	I-Language
.	O
</s>
<s>
Nevertheless	O
,	O
he	O
wrote	O
that	O
while	O
JSP	O
may	O
not	O
be	O
the	O
"	O
best	O
solution	O
for	O
the	O
Java	B-Language
Platform	O
"	O
it	O
was	O
the	O
"	O
Java	B-Language
solution	O
that	O
is	O
most	O
like	O
the	O
non-Java	O
solution	O
,	O
"	O
by	O
which	O
he	O
meant	O
Microsoft	O
's	O
Active	B-General_Concept
Server	I-General_Concept
Pages	I-General_Concept
.	O
</s>
<s>
Later	O
,	O
he	O
added	O
a	O
note	O
to	O
his	O
site	O
saying	O
that	O
JSP	O
had	O
improved	O
since	O
2000	O
,	O
but	O
also	O
cited	O
its	O
competitors	O
,	O
Apache	B-Language
Velocity	I-Language
and	O
Tea	O
(	O
template	O
language	O
)	O
.	O
</s>
<s>
Today	O
there	O
are	O
several	O
alternatives	O
and	O
a	O
number	O
of	O
JSP-oriented	O
pages	O
in	O
larger	O
web	B-Application
apps	I-Application
are	O
considered	O
to	O
be	O
technical	O
debt	O
.	O
</s>
