tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen <allentheengin...@earthlink.net>
Subject RE: Problem using BodyTag
Date Sat, 22 Jul 2000 14:45:15 GMT


Allen wrote:

> Hi,
>
> According to spec, in the public "int doAfterBody() throws JspException" method
> of your body tag, you have to have the following code after your last iteration
> through the body (which, if you only want the body to print out once, this could
> be your whole function - plus the call to the super version of it):
>     BodyContent body = getBodyContent();
>     try
>     {
>       body.writeOut(getPreviousOut());
>     }
>     catch (IOException e)
>     {
>       throw new JspException(e.toString());
>     }
>
>    return SKIP_BODY;
>
> What this does is gets the body content object and tells it to write what is in
> its output stream to the output stream of the body tag. If you do not do this,
> you will not see anything from the body.
>
> Allen
>
> > Date: Fri, 21 Jul 2000 18:15:45 +0200
> > To: <taglibs-user@jakarta.apache.org>
> > From: "michael" <m.steindl@serfloware.com>
> > Subject: Problem using BodyTag
> > Message-ID: <006001bff32e$ecc67ee0$358122c3@ODIN>
> >
> >  hi,
> >
> >  we've made a simple bodytag for an iteration in a jsp and wanted to try it
> >  out with tomcat - it doesn't work.
> >
> >  nothing inside the bodytag could be returned to the browser. All the
> >  bodytag-contents seemed to get lost.
> >
> >  however a tag inside our bodytag was processed as we could see from the
> >  output we've send to System.out. The only way around this problem seems to
> >  be writing to bodyContent.getEnclosingWriter()...
> >
> > our configuration is:
> >   - win 2000 server
> >   - jdk1.3
> >   - tomcat 3.1 (also tried tomcat 3.2 beta 2)
> >
> >  bye,
> >   Michael and Edmund
> >
> > ------------------------------
> >
> > End of taglibs-user Digest
> > ***********************************


Mime
View raw message