10 when even jstl is not enough: custom tag development sometimes jstl and standard actions aren’t...

50
10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t want to go back to scripting, you can write your own tag handlers. That way, your page designers can use your tag in their pages, while all the hard work is done behind the scenes in your tag handler class. But there are three different ways to build your own tag handlers, so there’s a lot to learn. Of the three, two were introduced with JSP 2.0 to make your life easier (Simple Tags and Tag Files). But you still have to learn about Classic tags for that ridiculously rare occasion when neither of the other

Upload: shon-fields

Post on 19-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t

10 When even JSTL is not enough: custom tag development

Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t want to go back to scripting, you can write your own tag handlers. That way, your page designers can use your tag in their pages, while all the hard work is done behind the scenes in your tag handler class. But there are three different ways to build your own tag handlers, so there’s a lot to learn. Of the three, two were introduced with JSP 2.0 to make your life easier (Simple Tags and Tag Files). But you still have to learn about Classic tags for that ridiculously rare occasion when neither of the other two will do what you want. Custom tag development gives you virtually unlimited power, if you can learn to wield it...

Page 2: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t

Objects of the Chapter

Page 3: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 4: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 5: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 6: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 7: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 8: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 9: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 10: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 11: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 12: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 13: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 14: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 15: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 16: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 17: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 18: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 19: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 20: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 21: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 22: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 23: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 24: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 25: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 26: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 27: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 28: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 29: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 30: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 31: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 32: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 33: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 34: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 35: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 36: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 37: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 38: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 39: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 40: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 41: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 42: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 43: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 44: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 45: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 46: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 47: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 48: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 49: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t
Page 50: 10 When even JSTL is not enough: custom tag development Sometimes JSTL and standard actions aren’t enough. When you need something custom, and you don’t