Reading Notes for Chapter 10, Head First Servlets and JSP

Table of Contents

489 When even JSTL is not enough... 516 SkipPageException stops only the page that directly invoked the tag 542 Getting info from child to parent
490 Objectives 517 There are no Dumb Questions (about SimpleTag handlers) 543 Menu and MenuItem tag handlers
491 Includes and imports can be messy 518 Simple Tag bullet points 544 Getting an arbitrary ancestor
492 Tag files: like include, only better 519 You still have to know about Classic tag handlers 545 Exercise: Key differences between Simple and Classic tags
493 But how do you send it parameters? 520 Tag handler API 546 Exercise Answers (to p. 545)
494 To a Tag File, you don't send request parameters, you send tag attributes 521 A very small Classic tag handler 547 Using the PageContext API for tag handlers
495 Aren't tag attributes declared in the TLD? 522 A Classic tag handler with TWO methods 548 Sharpen your pencil (Memorizing Tag Files) ANSWERS (from p. 501)
496 Tag Files use the attribute directive 523 When a tag has a body: comparing Simple vs. Classic 549 Coffee Cram Q1 Q2
497 When an attribute value is really big 524 But how do you loop over the body? 550 Coffee Cram Q3 Q4
498 Declaring body-content for a Tag File 525 Classic tags have a difference lifecycle 551 Coffee Cram Q6 Q6
499 Where the Container looks for Tag files 526 The Classic lifecycle depends on return values 552 Coffee Cram Q7 Q8
500 There are no dumb questions (about Tag files) 527 IterationTag lets you repeat the body 553 Coffee Cram Q9 Q10
501 Sharpen your pencil (Memorizing Tag Files) 528 Be the Container (tag handler and JSP tag invocation) 554 Coffee Cram Q11 Q12
502 When you need more than Tag Files... Sometimes you need Java 529 Default return values from TagSupport 555 Coffee Cram Q13 Q14
503 Making a Simple tag handler 530 Be the Container Answer (p. 528) 556 Coffee Cram Q15 Q16
504 A Simple tag with a body 531a There are no dumb questions (about doStartTag()) 557 Coffee Cram Q17 Q18
505 The Simple tag API 531b The Container can reuse Classic tag handlers! 558 Coffee Cram Q19 Q20 Q21
506 The life of a Simple tag handler 532 But what if you DO need access to the body contents? 559 Coffee Cram Answers Q1 Q2
507 Be the Container: TLD/JSP pairs 533 With BodyTag, you get two new methods 560 Coffee Cram Answers Q3 Q4
508 Be the Container Answers (p. 507) 534 With BodyTag, you can buffer the body 561 Coffee Cram Answers Q6 Q6
509 What if the tag body uses an expression? 535 Exercise: Lifecycle methods for Classic tag methods 562 Coffee Cram Answers Q7 Q8
510 A tag with dynamic row data: iterating the body 536 Exercise Answers (from p. 535) 563 Coffee Cram Answers Q9 Q10
511 A Simple tag with an attribute 537 What if you have tags that work together? 564 Coffee Cram Answers Q11 Q12
512 What exactly IS a JspFragment? 538 A Tag can call its Parent Tag 565 Coffee Cram Answers Q13 Q14
513 SkipPageException: stops processing the page 539 Find out just how deep the nesting goes... 566 Coffee Cram Answers Q15 Q16
514 SkipPageException shows everything up to the point of the exception 540 Simple tags can have Classic parents 567 Coffee Cram Answers Q17 Q18
515 But wht happens when the tag is invoked from an included page? 541 You can walk up, but you can't walk down... 568 Coffee Cram Answers Q19 Q20 Q21

p489 When even JSTL is not enough...

@@@

p490 Objectives

@@@

p491 Includes and imports can be messy

@@@

p492 Tag files: like include, only better

@@@

p493 But how do you send it parameters?

@@@

p494 To a Tag File, you don't send request parameters, you send tag attributes

@@@

p495 Aren't tag attributes declared in the TLD?

@@@

p496 Tag Files use the attribute directive

@@@

p497 When an attribute value is really big

@@@

p498 Declaring body-content for a Tag File

@@@

p499 Where the Container looks for Tag files

@@@

p500 There are no dumb questions (about Tag files)

@@@

p501 Sharpen your pencil (Memorizing Tag Files)

@@@

p502 When you need more than Tag Files... Sometimes you need Java

@@@

p503 Making a Simple tag handler

@@@

p504 A Simple tag with a body

@@@

p505 The Simple tag API

@@@

p506 The life of a Simple tag handler

@@@

p507 Be the Container: TLD/JSP pairs

Check the unconfirmed errata for this page!

@@@

p508 Be the Container Answers (p. 507)

@@@

p509 What if the tag body uses an expression?

@@@

p510 A tag with dynamic row data: iterating the body

@@@

p511 A Simple tag with an attribute

@@@

p512 What exactly IS a JspFragment?

@@@

p513 SkipPageException: stops processing the page

@@@

p514 SkipPageException shows everything up to the point of the exception

@@@

p515 But wht happens when the tag is invoked from an included page?

@@@

p516 SkipPageException stops only the page that directly invoked the tag

@@@

p517 There are no Dumb Questions (about SimpleTag handlers)

@@@

p518 Simple Tag bullet points

@@@

p519 You still have to know about Classic tag handlers

@@@

p520 Tag handler API

@@@

p521 A very small Classic tag handler

@@@

p522 A Classic tag handler with TWO methods

@@@

p523 When a tag has a body: comparing Simple vs. Classic

@@@

p524 But how do you loop over the body?

@@@

p525 Classic tags have a difference lifecycle

@@@

p526 The Classic lifecycle depends on return values

@@@

p527 IterationTag lets you repeat the body

@@@

p528 Be the Container (tag handler and JSP tag invocation)

@@@

p529 Default return values from TagSupport

@@@

p530 Be the Container Answer (p. 528)

@@@

p531a There are no dumb questions (about doStartTag())

@@@

p531b The Container can reuse Classic tag handlers!

@@@

p532 But what if you DO need access to the body contents?

@@@

p533 With BodyTag, you get two new methods

@@@

p534 With BodyTag, you can buffer the body

@@@

p535 Exercise: Lifecycle methods for Classic tag methods

@@@

p536 Exercise Answers (from p. 535)

@@@

p537 What if you have tags that work together?

@@@

p538 A Tag can call its Parent Tag

@@@

p539 Find out just how deep the nesting goes...

@@@

p540 Simple tags can have Classic parents

@@@

p541 You can walk up, but you can't walk down...

@@@

p542 Getting info from child to parent

@@@

p543 Menu and MenuItem tag handlers

@@@

p544 Getting an arbitrary ancestor

@@@

p545 Exercise: Key differences between Simple and Classic tags

@@@

p546 Exercise Answers (to p. 545)

@@@

p547 Using the PageContext API for tag handlers

@@@

p548 Sharpen your pencil (Memorizing Tag Files) ANSWERS (from p. 501)

@@@

p549 Coffee Cram Q1 Q2

@@@

p550 Coffee Cram Q3 Q4

@@@

p551 Coffee Cram Q6 Q6

@@@

p552 Coffee Cram Q7 Q8

@@@

p553 Coffee Cram Q9 Q10

@@@

p554 Coffee Cram Q11 Q12

@@@

p555 Coffee Cram Q13 Q14

@@@

p556 Coffee Cram Q15 Q16

@@@

p557 Coffee Cram Q17 Q18

@@@

p558 Coffee Cram Q19 Q20 Q21

@@@

p559 Coffee Cram Answers Q1 Q2

@@@

p560 Coffee Cram Answers Q3 Q4

@@@

p561 Coffee Cram Answers Q6 Q6

@@@

p562 Coffee Cram Answers Q7 Q8

@@@

p563 Coffee Cram Answers Q9 Q10

@@@

p564 Coffee Cram Answers Q11 Q12

@@@

p565 Coffee Cram Answers Q13 Q14

Check the unconfirmed errata for this page!

@@@

p566 Coffee Cram Answers Q15 Q16

@@@

p567 Coffee Cram Answers Q17 Q18

@@@

p568 Coffee Cram Answers Q19 Q20 Q21

@@@


End of CISC474 reading notes for HFSJ, Chapter 10


Valid XHTML 1.1 Valid CSS!