A
Java servlet is a
Java program that extends the capabilities of a
server. Although servlets can respond to any types of requests, they most commonly implement applications hosted on
Web servers. Such Web servlets are the
Java counterpart to other dynamic Web content technologies such as
PHP and
ASP.NET.