What is JSP Scriptlet?

By: Karthik Emailed: 1788 times Printed: 2623 times    

Answer: JSP Scriptlet is jsp tag which is used to enclose java code in the JSP pages. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked.
Example:
  <%
  //java codes
   String userName=null;
   userName=request.getParameter("userName");
   %>

Most Viewed Articles (in Interview )

Latest Articles (in Interview)

Comment on this tutorial