Java Server Pages

I promised you that I would not bore you with Java Server Pages because that is a technology of the past. Even though it is the past, it is still not history as there are many programs running that still use JSP and contain JSP code.

JSP pages are web pages that contain HTML and Java code mixed. When an HTTP request is served by a JSP page, the servlet container reads the JSP page, executes the Java parts, takes the HTML parts as they are, and in this way, mixing the two together, creates an HTML page that is sent to the browser.

<%@ page language="java"          contentType="text/html; charset=UTF-8"          pageEncoding="UTF-8"%> <html> <body> <% for( int i = 0 ; i < 5 ; i ++ ){ %>   hallo<br/> <% } %> </body> </html>

The preceding ...

Get Java 9 Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.