This is my personal opinion, of course. I say scriptlets are:
- A 1998 vintage technology that needs to disappear; a failed response to Microsoft’s ASP.
- Ugly
- Hard to read
- Hard to maintain
- Discourage reuse and encapsulation
- Encourage putting complex logic in pages
What to use instead?
- The world has gone in the direction of HTML5, CSS3, JavaScript, jQuery, Bootstrap, and web technologies talking to REST web services. It’s a good direction.
- If you must stick with JSPs, start with the JSP standard template library. Keep your HTML pages looking like HTML – it’ll make it easier for UI developers to maintain them.
- Try a more modern template solution like Thymeleaf to generate your HTML from the server side.