Personally, I like to keep my JavaBeans very business-object like. That is, primarily data containers with some behavior. However, when I want to provide specific presentation behavior based on that data I use a custom tag. Motivations for the custom tag are "can this functionality be used across other pages in my app?" If so, and the behavior is not tied to a specific type of data, then you may want to consider a custom tag. Often a motivation is more practical -- that is, as you build your app you will find places where it seems like you have to use scriptlet ... look at those sections and consider ... Could I put this behavior in the bean I am using? If not, or it doesn't seem appropriate, then probably a custom tag will meet your needs. Also, take a look at
Struts, Jakarta TagLibs, and JSTL. Good Luck!