Original HTML content on the web was largely static HTML pages.
CGI scripts were the first way of generating HTML pages with dynamic content.
Servlets are Java programs that run within a web server, or within a web application server.
There is a special Servlet API.
Servlets work hand-in-hand with databases, JavaBeans, components, and JSPs.
JSPs are a combination of HTML and Java code.
JSPs are a form of servlets; that is, they are compiled into servlets behind the scenes. In practice however, they appear quite different, and appear like a combination of HTML and Java code.
In practice, JSPs should be approximately 90% HTML code and 10% Java code.