JavaServer Page

March 11, 2007

Iterating With Tags This is obviously quite an

Filed under: JSP Tag Libraries — webmaster @ 11:29 am

CHAPTER 10 Iterating with tags 10.1 Iterating with tags 101 Developing custom JSP tags that iterate over some set of values requires us to work, once again, with the familiar BodyTag interface. The BodyTag interface provides a method call protocol to control the execution of the tag s body which we ll need in order to repeat the tag s body for every value in the JavaBean s indexed property. NOTE In JSP1.2 a new IterationTag interface was defined and we can also create tags using this interface. You can find information regarding the IterationTag later in this chapter. Figure 10.1 shows how a tag can implement iteration using the BodyTag method call protocol. Iteration Initalization t.doInitBody() Reiterating or Termination t.doAfterBody() doAfterBody() returns EVAL_BODY_TAG doAfterBody() returns SKIP_BODY Iteration is done Body Processing The JSP environment Process the body Figure 10.1 Implementing iteration using the BodyTag interface

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting