JSP 2.0 was introduced in 2002 with the JSTL and EL intended to replace Java scriptlets in JSP pages. 2002! In 2017, that is over 15 years ago! If you are still using scriptlets in JSPs, you are 15 years behind the times.
Java scriptlets have been obsolete and discredited since the introduction of JSP 2.0 and there are many good reasons not to use Java scriptlets in JSPs including:
Separation of Concerns - Best practices dictate that presentation logic and business logic should not be mixed.
Reusability - How would one reuse the Java code in a JSP in another JSP page or in a Java class?
Maintainability - A database column changes and you will be hunting through all your JSPs for places to change. Better to do this in Java classes lets where it can be easily refactored.
Scriptlets Break OOP - scriptlets cannot be extended or encapsulated.
Getting business logic out of JSPs lets you take advantage of the Java bean paradigm
Due to the above, a developer using scriptlets is a clear warning sign that a developer: