Question: why jsp scriptlets are bad?
Answer: The use of scriptlets in JSP pages is considered bad practice, and their use has been discouraged by Oracle/Sun for over a decade. The JSP Standard Tag Library (JSTL) was introduced as a way for JSP pages to get the data they need without embedding Java code.