• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classic Tags

 
priyanka kumari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

With reference to HFSJ page 511, please explain how is it working


Thanks in advance
Priyanka
 
Dave Seligson
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gosh, that sure is an open-ended question.
First of all, on page 511, that is a SimpleTag, not a "Classic" Tag.
Essentially, the point of that page is demonstrating
how to create a "SimpleTag" that repeatedly iterates and
processes a section of body text from within a tag.

The "getJspBody().invoke(null);" call within the Simple tag class
is used to reinterpret the body for each iteration of the body.
Since the little while loop reassigns the movie object thru
each iteration, then the "invoke(null)" call will
output the body with a different movie name and genre each time.

<tr>
<td>${movie.name}</td>
<td>${movie.genre</td>
</tr>


Hope that helps!
DaveS
SJCP 5.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic