Multiple choice technology architecture

Syntax of Scriptlet Element

  1. <% code %>

  2. <@jsp code %>

  3. <jsp: scriptlet code />

  4. <%jsp code %>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

JSP scriptlets use the syntax <% code %> to embed Java code that executes during page generation. The percentage symbols distinguish scriptlets from other JSP elements. Other options are incorrect - @jsp is not a valid prefix, and jsp:scriptlet is for XML-style actions, not scriptlets. Scriptlets are one of three main JSP scripting elements.