You can use Jasper's standard way to swap out the default TagHandlerPool with our impl.
Add following init parameters for org.apache.jasper.servlet.JspServlet in tomcat/conf/web.xml
Please be aware, this impl only provides a weak size limitation, which means it only tries its best to limit in-pool tag number under max size, but not guarantee for that. At peak load, there maybe sometime the actually in-pool tags can excess the max size. Since all our own tags are very light weight, some temporary oversize won't be a problem. But if you have any heavy weight tag customization, you may need to consider this factor. Either keep using the jasper default TagHandlerPool, or shrink the pool size for safety.
Unlike jasper's default TagHandlerPool using an array to hold all in-pool tags, this impl is using a link based queue to hold tags, so config a huge max size won't waste any static memory, it just means your pool can grow larger.