• 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

Is re-evaluation possible in SimpleTags?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Before JSP 2, there was an option in the custom tag libraries, "EVAL_BODY_AGAIN" and others like that which made the server re-evaluate the body of the tag after you change it. So you could write a code in a custom tag that outputs other custom tags. You could also use this for a sort of recursion.

I wish to know if this functionality is possible in SimpleTags. Is it?

I know that if your custom tag (which extends SimpleTagSupport) writes other custom tags, they are not evaluated. Not even the JSTL ones. I know that invoke() evaluates the body and writes the result to a supplied writer. One of my guesses was that if we change the body and call invoke again it would work. But SimpleTags store the body as a JspFragment and i could find no way to change it.

I would love to hear everyone's thoughts on this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic