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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.