Java Server Pages is used in creating dynamic content with in the HTML. We can insert java code very easily inside the HTML pages very easily using the <% scriptlet tags %>.
Behind the scene java servlet calls the Java Server Pages. Where one jsp call is equal to 100 java servlet calls.
Java Server Pages servers same purpose as servlet pages. JSP pages allows embedded HTML content which makes the JSP page light. JSP pages are pre-compiled pages.
JSP pages plays an important role on JavaEE projects. Which is very simple and easy to learn.
Advantages of JSP over :
HTML :- HTML pages cannot contain dynamic information.
Servlet :- We have to write 100’s of servlet code line and JSP normally perform it in one or two lines.
Active server pages (ASP) :- ASP is microsoft Web services operating system dependent Where as JSP pages does not depend upon any operating system.