JSP Tutorials - Herong's Tutorial Examples - v5.11, by 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.
Table of Contents
►JSP (JavaServer Pages) Overview
►What Is JSP (JavaServer Pages)
Popular JSP Enabled Web Servers
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet