This is a skeleton of what is needed to build a custom jsp tag which does something to its body. For example a tag could change the urls of all the links found in its body.
make a file called CustomTag.tld and put it into WEB-INF:
use it like this on your JSP:
<%@ taglib uri="com.mycompany.CustomTag" prefix="x"%>
here is some stuff inside the tag!