Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.BodyContent


  public int doAfterBody() throws JspException
  {
    try
    {
      // double checking for null as Resin had problems with that
      final BodyContent body = getBodyContent();
      if (body != null)
      {
        final JspWriter writer = getPreviousOut();
        if (writer != null)
        {
          body.writeOut(writer);
        }
      }

    }
    catch (IOException ioex)
View Full Code Here


    }

    @Override
    public int doAfterBody() throws JspException
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent != null)
        {
            UIOutput component = (UIOutput)getComponentInstance();
            component.setValue(bodyContent.getString());
            bodyContent.clearBody();
        }
        return super.getDoAfterBodyValue();
    }
View Full Code Here

    /**
     * TODO: Ignore <!-- --> comments
     */
    private boolean isBodyContentEmpty()
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent == null)
        {
            return true;
        }
        try
        {
            Reader reader = bodyContent.getReader();
            int c;
            while ((c = reader.read()) != -1)
            {
                if (!Character.isWhitespace((char)c))
                {
View Full Code Here

    /**
     * TODO: Ignore <!-- --> comments
     */
    private boolean isBodyContentEmpty()
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent == null)
        {
            return true;
        }
        try
        {
            Reader reader = bodyContent.getReader();
            int c;
            while ((c = reader.read()) != -1)
            {
                if (!Character.isWhitespace((char)c))
                {
View Full Code Here

        int status = this.tag.doStartTag();
        if (this.tag instanceof IterationTag)
        {
            if (status != Tag.SKIP_BODY)
            {
                BodyContent body = null;
                try
                {
                    IterationTag iterationTag = (IterationTag) this.tag;
                    if ((status == BodyTag.EVAL_BODY_BUFFERED)
                        && (this.tag instanceof BodyTag))
                    {
                        BodyTag bodyTag = (BodyTag) this.tag;
                        body = pageContext.pushBody();
                        if (log.isDebugEnabled())
                        {
                            log.debug("Pushed body content ["
                                + body.getString() + "]");
                        }
                        bodyTag.setBodyContent(body);
                        bodyTag.doInitBody();
                    }
                    int iteration = 0;
                    do
                    {
                        fireEvalBody(iteration, body);
                        if (log.isDebugEnabled())
                        {
                            log.debug("Body evaluated for the ["
                                + iteration + "] time");
                        }
                        status = iterationTag.doAfterBody();
                        iteration++;
                    } while (status == IterationTag.EVAL_BODY_AGAIN);
                    if (log.isDebugEnabled())
                    {
                        log.debug("Body skipped");
                    }
                    fireSkipBody();
                }
                finally
                {
                    if (body != null)
                    {
                        if (log.isDebugEnabled())
                        {
                            log.debug("Popping body content ["
                                + body.getString() + "]");
                        }
                        pageContext.popBody();
                        body = null;
                    }
                }
View Full Code Here

            context = context.deepClone();
           
            //
            //  Get the page data.
            //
            BodyContent bc = getBodyContent();
            String wikiText = bc.getString();
            bc.clearBody();

            if( wikiText != null )
            {
                wikiText = wikiText.trim();
           
View Full Code Here

        if( t != null )
        {
            String val = m_value;
            if( val == null )
            {
                BodyContent bc = getBodyContent();
                if( bc != null )
                {
                    val = bc.getString();
                }
            }
            if( val != null )
            {
                ((ParamHandler)t).setContainedParameter( m_name, val );
View Full Code Here

      }
      return (EVAL_BODY_BUFFERED);
  }
  public int doAfterBody() throws JspException {
      try {
          BodyContent body = getBodyContent();
          if (body != null) {
              JspWriter out = body.getEnclosingWriter();
              String encodedBody = HtmlCodec.encode(body.getString());
              out.print(
                  encodedBody.equalsIgnoreCase("null") ? "" : encodedBody);
          }

      } catch (IOException ex) {
View Full Code Here

    /**
     * TODO: Ignore <!-- --> comments
     */
    private boolean isBodyContentEmpty()
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent == null)
        {
            return true;
        }
        try
        {
            Reader reader = bodyContent.getReader();
            int c;
            while ((c = reader.read()) != -1)
            {
                if (!Character.isWhitespace((char)c))
                {
View Full Code Here

    /**
     * TODO: Ignore <!-- --> comments
     */
    private boolean isBodyContentEmpty()
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent == null)
        {
            return true;
        }
        try
        {
            Reader reader = bodyContent.getReader();
            int c;
            while ((c = reader.read()) != -1)
            {
                if (!Character.isWhitespace((char)c))
                {
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.tagext.BodyContent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.