I want someone to explain some points in BlausC\'s amazing answer in this question.
He said that scriptlets had some disadvantages, which are:
Reusa
It depends on the pattern you're using. By using the MVC (spring, struts, ...) you should avoid the usage of scriptlets in your JSP, because it represent the view it should contain pure XHTML tags. JSTL is a declarative language some kind of XML, while scriplet isn't.
Particularly I have used JSTL in combination with AJAX via prototype for generating RIA without needing to implement another pattern. Recently I have seen this kind of programming with ExtJS and DWR. In my case I found It was necessary to combine both JSTL and scriplets always preferring JSTL when possible.
<% String signExt="jpg"; %>
<% int r=0, iMaxRows=0, iMaxCols=0;%>
CALL GetProfilesView(' ', ' ')
<%
String strElements = pageContext.getAttribute("strElements").toString();
int iElements = (int)Integer.valueOf(strElements).intValue();
String to = "";
%>
<%for(int i=1, j=0, col=0; i<100; i++){%>
<%for(j=0; j<4; j++, col++){%>
<%=col%>
<%if( col < iElements){%>
.................
.................
<% if( col < iElements-1){
to = to + pageContext.getAttribute("sMail").toString() + ",";
}else{
to = to + pageContext.getAttribute("sMail").toString();
}
%>
<%}else{%>
x
.............
<%}%>
<%}%>
<%
if( col >= iElements){break;}
}%>
.............