There are a few other predefined variables but for this discussion those listed should suffice. Scriptlets provide a mechanism to insert code into the servlet's service method. By embedding beans within a JSP, it is possible to encapsulate functionality for a JSP as well as reuse the bean in other development efforts. Special treatment is given to beans in a JSP, which can make for a cleaner, less cluttered JSP page. For example, parameter values in a client request can automatically be used to set a bean's properties.
Beans also have scope and can be used per request, between pages, or even throughout an application.
Custom Tag libraries also provide a way for JSP to separate content from presentation. Using custom tag libraries it is possible to create business logic that is almost completely hidden from the presentation developer. The only thing that the presentation developer has to know is how to reference the tag library and use the tag. This could be as simple as one line of code, or it could be more complicated if tag interaction is required. As you can see, JSP technology is very powerful and useful but is not ideal.