Scriptlet

Why Trust Techopedia

What Does Scriptlet Mean?

A scriptlet is a piece of software code that is used by a native Web page scripting language to perform a specific function or process. Scriptlets are primarily implemented in JavaServer Pages (JSP) and include variables, expressions or statements that are used only when requested by a certain client or process.

Advertisements

Techopedia Explains Scriptlet

By default, a scriptlet supports Java code but also favors other languages. Scriptlet code is embedded in each JSP page. Generally, a scriptlet is downloaded on a client device/browser and executed whenever it is requested by the JSP engine or primary JSP page.

Primary scriptlet functions include:

  • Declaring variables or objects for use by JSP pages
  • Defining valid expressions
  • Adding workable code

However, the Web page’s HTML and text body are separate and excluded from the scriptlet code.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.