Dmitri Namiot wrote:
>
> Suppose I have a BodyTag. What do I need is to grab the body as
> it is, do some preprocessing and execute it only after that. I can pickup
> a body in doAfterBody() function and return EVAL_BODY there. But it means
> the body was executed once already.
> Is it possible to avoid this first execution? In other words is it
> possible in the current spec just read the body?
If you specify <bodycontent> as tagdependent in the TLD, you get access
to the body contents as-is in doAfterBody(). This was clarified after
the JSP 1.1 spec was released, so be aware that it may not work in all
current JSP container versions (for instance, I believe it was just
recently fixed in Tomcat so it may only work in the nightly builds).
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets