Contains a code fragment valid in the page scripting language.
<%
code fragment
%>
<jsp:scriptlet>code fragment
</jsp:scriptlet>
<% String name = null; if (request.getParameter("name") == null) { %> <%@ include file="error.html" %> <% } else { foo.setName(request.getParameter("name")); if (foo.getName().equalsIgnoreCase("integra")) name = "acura"; if (name.equalsIgnoreCase( "acura" )) { %>
A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language.
Within a scriptlet, you can do any of the following:
<jsp:useBean>
element.
Any text, HTML tags, or JSP elements you write must be outside the scriptlet.
Scriptlets are executed at request time, when the JSP container processes the request. If the scriptlet produces output, the output is stored in the out
object.