A JSP file is a file with the .jsp extension containing HTML and specific tags:
<servlet> tags to integrate a servlet within the HTML code.
JSP syntax tags (there are four different types).
Through the use of tags, JSP can easily integrate Java code within the HTML code. The main advantage of this mechanism compared to servlets, is the separation between the data (directly encoded in HTML) and the logic (process) provided by Java.
JSP can be used to access reusable components (servlets, JavaBeans, Enterprise JavaBeans (EJB)).
The <servlet> tag
The first method for integrating Java content in an HTML page is to use the <servlet> tag.