In my recent efforts on writing a Java Mediator for SDLTridion templating, I have now reached the point where I can write Template Building Blocks in JSP . Next is to enable JSTL support in the JSP TBB. That means to be able to use the Java Standard Tag Library (JSTL) and Expression Language (EL) in my JSP TBBs. This functionality allows the following in a JSP TBB: declare a taglib in my JSP with a given prefix. The interesting part is the uri attribute -- which comes from the TLD (Tag Library Definition) file. For JSTL, the .tld files are contained in the JAR itself, under path META-INF/ . Each uri identifies a unique .tld file. This way, the J2EE engine knows which .tld to load, and therefore, which implementation classes, tags and method signatures are available within that TLD; use EL to read variables from the package . Yes, it is cool! In the example below, expression ${UserName} reads the item with name UserName from the package and outputs its value; ...
talk is cheap. show me the code.