I have to agree with Mark here. The core problem is that the "scriptlets are bad" rule is a crude and inaccurate simplification of the more general rule of thumb: "Avoid mixing big chunks of processing code in your presentation code". It doesn't matter so much whether the code is JSP tags or scriptlet code. This thread here is a good example of how the "scriptlets are bad" rule is wrong. The solution presented here using a scriptlet is shorter and easier to understand and maintain. It's a clear winner in my opinion.
There are things which JSP tags are not good for, and this is one of them.
As for writing a taglib, it just another case of weighing up the cost (time + effort, extra code) of doing that against the gains (reusability, code organisation). Unless you plan to reuse that snippet of code later, I would probably just go for the cheapest solution instead of paying extra cost. You can pay the extra cost later to make a tablib if you really need to.
cheers,
--
Simon