<s>
In	O
software	B-General_Concept
engineering	I-General_Concept
,	O
a	O
WAR	O
file	O
(	O
Web	B-Language
Application	I-Language
Resource	I-Language
or	O
Web	B-Language
application	I-Language
ARchive	I-Language
)	O
is	O
a	O
file	O
used	O
to	O
distribute	O
a	O
collection	O
of	O
JAR-files	B-Language
,	O
JavaServer	B-Language
Pages	I-Language
,	O
Java	B-Application
Servlets	I-Application
,	O
Java	B-Language
classes	O
,	O
XML	B-Protocol
files	O
,	O
tag	O
libraries	O
,	O
static	O
web	O
pages	O
(	O
HTML	B-Language
and	O
related	O
files	O
)	O
and	O
other	O
resources	O
that	O
together	O
constitute	O
a	O
web	B-Application
application	I-Application
.	O
</s>
<s>
A	O
WAR	O
file	O
may	O
be	O
digitally	O
signed	O
in	O
the	O
same	O
way	O
as	O
a	O
JAR	B-Language
file	I-Language
in	O
order	O
to	O
allow	O
others	O
to	O
determine	O
where	O
the	O
source	O
code	O
came	O
from	O
.	O
</s>
<s>
The	O
/WEB	O
-INF	O
directory	O
in	O
the	O
WAR	O
file	O
contains	O
a	O
file	O
named	O
web.xml	B-Language
which	O
defines	O
the	O
structure	O
of	O
the	O
web	B-Application
application	I-Application
.	O
</s>
<s>
If	O
the	O
web	B-Application
application	I-Application
is	O
only	O
serving	O
JSP	B-Language
files	I-Language
,	O
the	O
web.xml	B-Language
file	O
is	O
not	O
strictly	O
necessary	O
.	O
</s>
<s>
If	O
the	O
web	B-Application
application	I-Application
uses	O
servlets	B-Application
,	O
then	O
the	O
servlet	B-Application
container	O
uses	O
web.xml	B-Language
to	O
ascertain	O
to	O
which	O
servlet	B-Application
a	O
URL	O
request	O
will	O
be	O
routed	O
.	O
</s>
<s>
The	O
web.xml	B-Language
file	O
is	O
also	O
used	O
to	O
define	O
context	O
variables	O
which	O
can	O
be	O
referenced	O
within	O
the	O
servlets	B-Application
and	O
it	O
is	O
used	O
to	O
define	O
environmental	O
dependencies	O
which	O
the	O
deployer	O
is	O
expected	O
to	O
set	O
up	O
.	O
</s>
<s>
The	O
servlet	B-Application
container	O
is	O
responsible	O
for	O
providing	O
this	O
service	O
.	O
</s>
<s>
The	O
following	O
sample	O
web.xml	B-Language
file	O
demonstrates	O
the	O
declaration	O
and	O
association	O
of	O
a	O
servlet	B-Application
:	O
</s>
<s>
The	O
/WEB-INF/classes	O
directory	O
is	O
on	O
the	O
ClassLoader	B-Language
's	O
classpath	B-Language
.	O
</s>
<s>
(	O
The	O
classpath	B-Language
consists	O
of	O
a	O
list	O
of	O
locations	O
from	O
which	O
.class	B-Language
files	O
can	O
be	O
loaded	O
and	O
executed	O
by	O
the	O
JVM	O
.	O
)	O
</s>
<s>
The	O
/WEB-INF/classes	O
directory	O
contains	O
the	O
classes	O
associated	O
with	O
the	O
web	B-Application
application	I-Application
itself	O
.	O
</s>
<s>
Any	O
JAR	B-Language
files	I-Language
placed	O
in	O
the	O
/WEB-INF/lib	O
directory	O
will	O
also	O
be	O
placed	O
on	O
the	O
ClassLoader	B-Language
's	O
classpath	B-Language
.	O
</s>
