The nice thing about tag libraries is that they don't necessarily need a TLD file to drive them - a folder is more than enough for simple cases:
File
/WEB-INF/tags/hello.tag
Hello, world! from a tag
File /index.jsp
<@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<tags:hello />
It's really that simple!There's obviously more to it (how to pass the tag body, how to pass parameters to the tag) - maybe next time :)
No comments:
Post a Comment