JSP Scriplet

A scriptlet can have any number of statements, variable or method declarations, or expressions that must be valid in the page scripting language.

JSP Scriplet

JSP Scriplet

     

A scriptlet can have any number of statements, variable or method declarations, or expressions that must be valid in the page scripting language.

A scriptlet, you can have any of the following:

  • Declaration of variables or methods that should be used later in the JSP page.
  • Expressions valid in the page scripting language.
  • Any implicit object can be used or any object can be declared with a <jsp:useBean> element.
  • Any valid statement written in the scripting language can be used in the JSP page.

Write any text, HTML tags, or JSP elements outside the scriptlet.

Scriptlets are executed when the JSP container processes the request. Output (if) generated by scriptlet is stored in the out object.

To know more about jsp scriptlet go to:

http:/www.roseindia.net/jsp/jspscriptlets.shtml