• Post Reply Bookmark Topic Watch Topic
  • New Topic

murach's servlets - what about tag files?  RSS feed

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36455
460
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw the part in the book that covers Java tag implementations. Are tag files covered in the book? We used those to contain code that gets reused like headers that are mostly HTML. Just like JSPs are used over servlets when it is mostly HTML.

I haven't finished reading yet so it might be I haven't gotten to this part.
 
Bruce Alspaugh
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't find anything specifically about tag files either. However, for including things like headers and footers that are mostly HTML, Chapter 6 shows three techniques for including files in a JSP. To include a file at compile-time, he shows how to use an include directive. To include a file at runtime, he shows how to use the include action and the JSTL import tag.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the inception of JSP 2, I've used tag files almost exclusively for includes as they can be explicitly parameterized.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36455
460
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Since the inception of JSP 2, I've used tag files almost exclusively for includes as they can be explicitly parameterized.

I use them a good bit too. That's why I missed their absence. It's harder to use an include for a header because there is different information in there (navigation/breadcrumbs) that depends on the page.
 
Joel Murach
Author
Ranch Hand
Posts: 99
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, as you mentioned, JSP tag files aren't covered in this book. I haven't used them much and didn't realize that they were so widely used. I have made a note of this and plan on adding some coverage of them in the next edition of this book. Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!