JSP Custim tag problem please help


Web tier: servlets, JSP, Web frameworks: JSP Custim tag problem please help

  1. JSP Custim tag problem please help (1 messages)

    Hi everyone I am using a simple custom jsp tag to take a peice of text and reformmat it into utf8. The tag works when the text is less than about 3400 characters however if the body length exceeds this then it fails to work. the System out however still displays the properly formmated text.
    I can't use mutiple tags between the text as i am using another tag to include the text into my document. Any help would really be appreeciated.
    Jeff Anderson
    janderso at organic dot com

    the tag implements the the bodytagsupport interface. the tag is as follows.

    text here

    The code is as follows

    public class UTF8Tag extends BodyTagSupport{

      public int doAfterBody() throws JspException{

                        BodyContent body =getBodyContent();
      String baseString=body.getString()

                        String UTF8String=new String(baseString.getBytes(),"UTF-8");

                        //debug code
                        System.out.println("UTF PRINTED");


      catch(Exception e){
      throw new JspTagException("io error");
      return SKIP_BODY;

  2. This may be a shot in the dark Jeff, but could this be a buffering issue on the output? Does it display up to the 3400 or none at all if it exceeds that length?