TBH, when I said image.setHeight().. I meant inside the servlet. In other words, have a base servlet which was designed for easy subclassing (vs. the current parbase img servlet which is not really designed for extension).

But... if your usecase is accurate, then I'd suggest just having a new servlet associated with the parbase resourcetype and a different selector (sized-img ?). In other words, if no one would ever use the common component, then the common component probably shouldn't exist.

Look forward to hearing back from @XiaohuiYang on the actual use case.