I can't find good documentation on how to write modern tag libraries without Java in JSPX?
Spring Roo provides lots of examples (and seems to be only project that uses tagx extensively).
I may make this another question but every time I want to not repeat myself in JSPX (DRY) I feel like have to sacrifice valuable time and go create a tag library because there are no inline macros.
I feel like I must be missing something in JSP/X.
No, you cannot use JSP tags in JavaScript in the browser. JSP is a server-side technology, which means that processing must be done on the server.
A tag library defines a collection of custom actions. The tags can be used directly by developers in manually coding a JSP page, or automatically by Java development tools. A tag library must be portable between different JSP container implementations.
In order to use custom JSP tags, you need to define three separate components: the tag handler class that defines the tag's behavior, the tag library descriptor file that maps the XML element names to the tag implementations, and the JSP file that uses the tag library.
The best resource I could find on JSP Tag libraries is from the horses mouth: http://download.oracle.com/javaee/5/tutorial/doc/bnalj.html
You have to mentally convert the JSP code to JSPX.
I'm trying the same technology now. I've found this tutorial which explains the question using an understandable example: Spring MVC: from JSP and Tiles to Thymeleaf
Hope this helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With