You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeffrey Bonevich <bo...@telocity.com> on 2002/04/08 06:15:24 UTC
How to mess with BodyContent prior to evaluation
Here is what I want to do:
* I have a taglib with a tag:
<mytag:get value="value_name" [parse="(true|false)"]/>
* the GetTag class extends BodyTagSupport
* doStartTag returns EVAL_BODY_BUFFERED
* doInitBody() needs to get the object/value associated with value
attribute; so I lookup "value_name" in a repository object I shoved in
my PageContext early on...
* then I want to potentially parse the value (rendered as a string of
course) as JSP; otherwise I just print out the value via
pageContext.getOut().print(value.toString())
The latter part is simple enough to do, but there seems to be no way to
grab the contents of the BodyContent, muck with those contents, and then
stuff them back in and have them evaluated as JSP. Thought I might be
able to do this in doInitBody (as the spec sez that BodyContent has not
been evaluated yet at this point), but I can determine no
straightforward (i.e. no implementation-specific) way to do this.
Anyone have suggestions? Need more to go on (I can provide code if that
helps)?
jeff
--
Jeffrey Bonevich
Ann Arbor, Michigan
bonevich@telocity.com
http://www.bonevich.com
Hwæt! Wë Gär-Dena in geär-dagum,
peod-cyninga, prym gefrünon,
hü ða aepelingas ellen fremedon!
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>