Rule Definition
From JSP 1.2 Specification, it is highly recommended that the JSP Standard Tag Library (JSTL) be used in your web application to help reduce the need for JSP scriptlets in your pages. Pages that use JSTL are, in general, easier to read and maintain.
Remediation
Review the design of the Page to reduce the number of Scriptlets
Violation Code Sample
<html> <head> <title>Count to 10 in JSP scriptlet</title> </head> <body> <% for(int i=1;i<=10;i++) {%> <%=i%><br/> <% } %> </body> </html>
Fixed Code Sample
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head> <title>Count to 10 Example (using JSTL)</title> </head> <body> <c:forEach var="i" begin="1" end="10" step="1"> <c:out value="${i}" /> <br /> </c:forEach> </body> </html>
Reference
http://java.sun.com/developer/technicalArticles/javaserverpages/code_convention
http://stackoverflow.com/questions/2128024/does-scriptlet-hit-the-performance-in-jsp
Related Technologies
JEE
Technical Criterion
Volume - Number of Components
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.