Hi I like to know I read all the all the time use JSTL or EL in JSP.. Just curious to know does scriptlet in JSP hit the performance?
First, using scriptlets (embedding raw Java code in JSP using the old fashioned <% %>
things) is not the same as using taglibs (e.g. JSTL) and EL (the ${}
things).
The performance penalty of taglibs and EL is really negligible and only noticeable during compilation and does by far not outweigh the advantages of using taglibs and EL instead of scriptlets.
All JSP taglibs and scriptlets get compiled to a Java class before execution, so there's virtually no performance difference for using one or the other.
The general advice to use JSTL and EL instead of scriptlets has absolutely nothing to do with performance; if anything, scriptlets are likely to yield better performance.
But they also lead to "tag soup" that is hard to maintain. You're supposed to use JSTL/EL because JSPs are supposed to be a presentation layer and not contain significant logic.