I know that using scriptlets are considered taboo nowadays. Its okay and I will agree to the Top Star’s words (as I am just a novice in Java at the moment).
What I have heard so far is, its to make the designers life easier. But I wonder, if it has anything to do with performance of JSP pages. On the other hand, if its just for “making designers life easier”, what do you guys think about using scriptlets in a situation where Java developer do both the work ?
If scriptlets are bad in all aspects nowadays, what are your recommendations ? EL ? JSTL ?
Thanks
It is not just about making others life easier, it is also about making YOUR life easier. JSTL and other tags force/help you to write a JSP properly. A problem with scriptlets is that people do things in a JSP that they shouldn’t. I mean, JSTL (among other tags) helps you to keep MVC pattern because basically, if there is something that you cannot do with JSTL in a JSP, it is because you should not. If you do not respect MVC and do things in JSPs that you shouldn’t
You can use JSTL, struts tags, springs tags, etc. There are few options and you can combine them.