• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Body of tag always written to JSP page?

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I'm trying to learn more about tag libraries and creating your own tags. I've tried out the RepeatHelloTag example from this page:

http://j2ee.masslight.com/Chapter3.html#scopeobjects

It works fine but I just want to understand How it works:
Is the body content always written to the JSP page when the body is evaluated (even if you haven't written any code)?

It seems to be something like that because when you run the example code the body content is written times, though only the Last call to actually seems to print anything. (The previous calls just increment the counter.)

But how does really work?
Maybe the body content is automatically written to some buffer at each iteration and getPreviousOut prints the whole content of that buffer?
But then if you'd only want to print out the last two iterations (for some reason) that would not be possible, or would it?

It would be nice if someone could shred some light on this issue for me.

Thanks in advance!

/Ylva
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic