1.

What is the JSP Scriptlet?

Answer»

The JSP Scriptlet tag allows you to write Java code into a JSP file. The JSP container moves statements in the _jspservice() method while generating servlets from JSP.

For each REQUEST of the client, the service method of the JSP gets invoked hence the code inside the Scriptlet executes for EVERY request.

In Scriptlet, a java code is EXECUTED every time the JSP is invoked.

Syntax of Scriptlet tag:

<% java code %>

Here <%%> tags are scriptlet tags and within it, we can place the java code.



Discussion

No Comment Found