I've had a bit of down time the last couple of days so I started messing around with custom tags because I really never have looked too much into them. Lucky for me the JSP 2.0 spec has SimpleTagSupport to make my life easier. I started out with some simple tags that simply spit out strings and/or some simple HTML and then I decided to create a tag that makes an html SELECT item feeding it attributes for values and items via EL. I was able to accomplish this pretty easily, but I am wondering if I am going about it the right way. Below is my doTag method (stripped down a bit for easy reading)
Now my real code is a bit more complex simply because it iterates over collections of items and values and creates a bunch of OPTION tags. But this gets the point across. Is it common to have to deal with this much printing out of HTML strings in custom tags? Or am I missing something?