“JSP technology is an extension of the servlet technology.”

JavaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets.
we write the regular HTML in the normal manner, then enclose the code for the dynamic parts in special tags, most of which start with <%and end with %>

HOW JSP WORKS

The process of making JavaServer Pages accessible on the Web is muchsimpler than that for servlets. all we need is a web server that support JSP pages . we save our file with .jsp extension and thats all no compiling, no packages, no classpath required.
Behind the scene our JSP page is translated into a servlet where static HTML content being printed to the output stream associated with servlet’s service method.

Inside a JSP Page :

Aside from the regular HTML, there are three main types of JSP constructs that you embed in a page: scripting elements, directives, and actions.
SCRIPTING ELEMENTS : java code that will become part of resultant servlet.
DIRECTIVES : control the overall structure of servlet.
ACTION : control the behaviour of JSP engine.

SCRIPTING ELEMENTSEXPRESSIONS : which are evaluated and then inserted into servlet’s output . General form : <%= %>