wellnwill

JSP

Scriptlets

  • JSP Scriptlet elements allows any valid java statement in it.
  • All the code written in scriptlet tags becomes member of service method of generated Servlet

Syntax

<% 
// java statements 
%>

Example

<%
int i = 10;
out.println(i);
System.out.println(i);
...
%>

After translation _jspService()

_jspService(){
...
int i = 10;
out.println(i);
System.out.println(i);
...
}

Footer with Map

Top