jsp2 tagfiles for building components
Published by peter April 7th, 2006 in java.While introducing Spring MVC to the design team I got a question on building UI components. It got me thinking, most solutions have major drawbacks (in configuration, lines of code and flexibilty).
During my ride home I remembered the addition of ‘tagfiles’ in the 2.0 version of jsp, which make it easy to create tags by writing jsp2.0 pages.
After investigating tagfiles it seems exactly what I need, providing a solution quite similar to including page fragments (which is really intuitive for most people) with some extra features like passing parameters and providing a callback mechanisme to snippets in the parent page!
The following links contain some simple examples and documentation for tagfiles as well as some other less known features of jsp2:
- http://java.sun.com/developer/technicalArticles/javaserverpages/JSP20/
- http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags.html#wp74644




















Interesting, but so far I get “ttp is not a registered protocol” when clicking on the link!
Hmm, beginners error, the h of http is outside the tags.
Interesting stuff, will do some more reading.
Maybe I should add a disclaimer:
I’m typing all this wearing sunglasses…. the difference between black and blue is just not noticeable. I’m beginning to understand to problems one might face being colorblind!