Overview

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. It contains a standardized tag set which means more maintainable code and separation of concerns between application layers.

In this article, we'll discuss the disadvantages of scriptlets and explore how we can use both JSTL and MVC architecture to improve our code.