Chapter 16 - Developing custom tag libraries

This application contains sample JSP pages that test the different custom tags as shown in chapter 16.

Link to JSP page Custom tag used Handler class explained in
requiredTest.jsp <test:required> Section 16.3.2, Listing 16.2
greetTest.jsp <test:greet> Section 16.3.3
greetTest.jsp?user=john <test:greet> Section 16.3.3
greetTest.jsp?user=mary <test:greet> Section 16.3.3
ifTest.jsp <test:if> Section 16.3.4
ifTest.jsp?debug=true <test:if> Section 16.3.4
loopTest.jsp <test:loop> Section 16.4.2, Listing 16.3
markerTest.jsp <test:mark> Section 16.5.2, Listing 16.4
implicitTest.jsp <test:implicit> Section 16.6.3, Listing 16.5
switchTest.jsp?action=sayHello <test:switch>,<test:case>,<test:default> Section 16.6.4, Listing 16.6, 16.7, 16.8, 16.9
switchTest.jsp?action=sayGoodBye <test:switch>,<test:case>,<test:default> Section 16.6.4, Listing 16.6, 16.7, 16.8, 16.9
switchTest.jsp?action=nothing <test:switch>,<test:case>,<test:default> Section 16.6.4, Listing 16.6, 16.7, 16.8, 16.9

Important

After you see the results of executing the above JSP pages, take a look at the JSP files, the Java source files of these tag handler classes, and the TLD file. Modify them, try out different samples and practice the various concepts explained in this chapter.