Scriptlets
The most basic kind of scripting element is the scriptlet.
A scriptlet is an arbitrary fragment of Java code.
This Java code is just copied to the request handling method in the servlet code, generated when the JSP page is translated.
The placement of the scriplet code in the generated servlet just reflects the position of the scriplet element in the JSP source.
- Reasonably enough, it follows the generated code that outputs the preceding template text, and precedes the generated code that outputs the following template text.
The syntax of a scriplet element is: