JSP Tutorials - Herong's Tutorial Examples - Version 5.00, by Dr. Herong Yang
What Is JSP (JavaServer Pages)
This section describes what is JSP (JavaServer Pages) - A Web application technology that allows you to generate dynamic data in Web documents with embedded Java statements and other expressions in special tags.
What Is JSP (JavaServer Pages)? JSP is a technology, not a language. It allows Web page authors to generate dynamic data into a Web document with embedded Java statements and other expressions in special tags. The embedded statements and expressions will be executed by the JSP enabled Web server, not by the Web browser.
Here is the official definition of JSP from the JSP specification document: JavaServer Pages (JSP) is the Java Platform, Enterprise Edition (Java EE) technology for building applications for generating dynamic web content, such as HTML, DHTML, XHTML, and XML. JSP technology enables the easy authoring of web pages that creates dynamic content with maximum power and flexibility.
What Is a JSP Page? A JSP page is a text document that contains a mixture of two types of data:
When a JSP page is processed by a Web server, the final output document should form a complete HTML document to be delivered back to the Web browser.
Here is a simple JSP page example, hello.jsp:
<html><body> <% out.println("Hello world!"); %> </body></html>
As you can see, line 1 and 3 of hello.jsp are static data. Line 2 is a JSP element that represents dynamic data.
When hello.jsp is processed by the Web server, it will produce a HTML document with these lines:
<html><body> Hello world! </body></html>
The diagram below illustrates how static data and dynamic data get mapped into the final HTML document.
For more information on JSP, see the latest release of JSP specification, JSP 2.3, at https://jcp.org/en/jsr/detail?id=245.
Last update: 2018.
Table of Contents