hi,
 I got little problem with Tomcat 4.0.5 (I don't know if this version is still in 
develoment) it appears in taglibs, specially in <bodycontent>JSP</bodycontent> and i 
think it's bug.. before i report i'm asking you is it (I hope i'm wrong this time)

It goes like this:

i have this kind of tags:

<tag>
<name>ShowContent</name>
                <tagclass>com.ilmi.net.content.AContentShowTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Show content</info>
...continues
</tag>

<tag>
<name>Print</name>
                <tagclass>com.ilmi.net.content.AContentPrintTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Show just some Content</info>
.. continues
</tag>

with this (if i read specifcation right) all the HTML and other stuff should be 
printed allso not just JSP output (Right??)

So i have JSP page:

<HTML>
 <HEAD>
   <TITLE>CONTENT TAGS EXAMPLES</TITLE>
 </HEAD>
 <BODY>
 


        <%-- First we must import some Tag libraries --%>
        <%@ taglib uri="ilmi/ilmi-content" prefix="content"%>

        <h1>Testing content tags separated</h1>

        <%-- Then we create some content handler. with database connection --%>
        <content:ShowContent mode="local" upload="content_example.jsp"
                 connector="/home/tuukka/src/java/common/pdf_example.xml"
                 contenttable="contents" articletable="articles" filetable="files" 
imagetable="images"
                 key="test" language="en" >

        <%-- This is for adding content if we want to this isn't 'must' --%>
        <content:AddContent />

                test.
                <content:Print type="header" prefix="<h1>Header</h1>" suffix="<BR>" />
                <content:Print type="teaser" prefix="<h1>Teaser</h1>" suffix="<BR>" />
                <content:Print type="content" prefix="<h1>Content</h1>" suffix="<BR>" 
/>
                <content:Print type="date" prefix="<h1>Date</h1>" suffix="<BR>" />
                test2.

        <A HREF="content_example.jsp?control=add">Add new message</A>
        
        </content:ShowContent>


 </BODY>
</HTML>


it's for testing so it's looks stupid.. i can get JSP output put not those "test" and 
"test2".. (Now comes fun part) they appears in jasper parsed code like this..

[SNIP]


// end
            // begin [file="/content_tags_example.jsp";from=(14,1);to=(17,29)]
                /* ----  content:ShowContent ---- */
                com.ilmi.net.content.AContentShowTag _jspx_th_content_ShowContent_0 = 
new com.ilmi.net.content.AContentShowTag();
                _jspx_th_content_ShowContent_0.setPageContext(pageContext);
                _jspx_th_content_ShowContent_0.setParent(null);
                _jspx_th_content_ShowContent_0.setMode("local");
                _jspx_th_content_ShowContent_0.setUpload("content_example.jsp");
                
_jspx_th_content_ShowContent_0.setConnector("/home/tuukka/src/java/common/pdf_example.xml");
                _jspx_th_content_ShowContent_0.setContenttable("contents");
                _jspx_th_content_ShowContent_0.setArticletable("articles");
                _jspx_th_content_ShowContent_0.setFiletable("files");
                _jspx_th_content_ShowContent_0.setImagetable("images");
                _jspx_th_content_ShowContent_0.setKey("test");
                _jspx_th_content_ShowContent_0.setLanguage("en");
                try {
                    int _jspx_eval_content_ShowContent_0 = 
_jspx_th_content_ShowContent_0.doStartTag();
                    if (_jspx_eval_content_ShowContent_0 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                        try {
                            if (_jspx_eval_content_ShowContent_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_ShowContent_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) 
out);
                              _jspx_th_content_ShowContent_0.doInitBody();
                          }
                          do {
                          // end
                          // HTML // begin 
[file="/content_tags_example.jsp";from=(17,29);to=(19,1)]
                              out.write("\n\n\t");

                          // end
                          // HTML // begin 
[file="/content_tags_example.jsp";from=(19,69);to=(20,8)]
                              out.write("\n        ");

                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(20,8);to=(20,30)]
                              /* ----  content:AddContent ---- */
                              com.ilmi.net.content.AContentAddTag 
_jspx_th_content_AddContent_0 = new com.ilmi.net.content.AContentAddTag();
                              
_jspx_th_content_AddContent_0.setPageContext(pageContext);
                              
_jspx_th_content_AddContent_0.setParent(_jspx_th_content_ShowContent_0);
                              try {
                              int _jspx_eval_content_AddContent_0 = 
_jspx_th_content_AddContent_0.doStartTag();
                              if (_jspx_eval_content_AddContent_0 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                              try {
                              if (_jspx_eval_content_AddContent_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_AddContent_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) 
out);
                              _jspx_th_content_AddContent_0.doInitBody();
                          }
                          do {
                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(20,8);to=(20,30)]
                          } while (_jspx_th_content_AddContent_0.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
                      } finally {
                          if (_jspx_eval_content_AddContent_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
                              out = pageContext.popBody();
                      }
                  }
                  if (_jspx_th_content_AddContent_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
                      return;
              } finally {
                  _jspx_th_content_AddContent_0.release();
              }
          // end
          // HTML // begin [file="/content_tags_example.jsp";from=(20,30);to=(23,2)]
              out.write("\n\n\t\ttest.\n\t\t");

          // end
          // begin [file="/content_tags_example.jsp";from=(23,2);to=(23,72)]
              /* ----  content:Print ---- */
              com.ilmi.net.content.AContentPrintTag _jspx_th_content_Print_0 = new 
com.ilmi.net.content.AContentPrintTag();
              _jspx_th_content_Print_0.setPageContext(pageContext);
              _jspx_th_content_Print_0.setParent(_jspx_th_content_ShowContent_0);
              _jspx_th_content_Print_0.setType("header");
              _jspx_th_content_Print_0.setPrefix("<h1>Header</h1>");
              _jspx_th_content_Print_0.setSuffix("<BR>");
              try {
                  int _jspx_eval_content_Print_0 = 
_jspx_th_content_Print_0.doStartTag();
                  if (_jspx_eval_content_Print_0 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                      try {
                          if (_jspx_eval_content_Print_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_Print_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                              _jspx_th_content_Print_0.doInitBody();
                          }
                          do {
                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(23,2);to=(23,72)]
                          } while (_jspx_th_content_Print_0.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
                      } finally {
                          if (_jspx_eval_content_Print_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
                              out = pageContext.popBody();
                      }
                  }
                  if (_jspx_th_content_Print_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
                      return;
              } finally {
                  _jspx_th_content_Print_0.release();
              }
          // end
          // HTML // begin [file="/content_tags_example.jsp";from=(23,72);to=(24,2)]
              out.write("\n\t\t");

          // end
          // begin [file="/content_tags_example.jsp";from=(24,2);to=(24,72)]
              /* ----  content:Print ---- */
              com.ilmi.net.content.AContentPrintTag _jspx_th_content_Print_1 = new 
com.ilmi.net.content.AContentPrintTag();
              _jspx_th_content_Print_1.setPageContext(pageContext);
              _jspx_th_content_Print_1.setParent(_jspx_th_content_ShowContent_0);
              _jspx_th_content_Print_1.setType("teaser");
              _jspx_th_content_Print_1.setPrefix("<h1>Teaser</h1>");
              _jspx_th_content_Print_1.setSuffix("<BR>");
              try {
                  int _jspx_eval_content_Print_1 = 
_jspx_th_content_Print_1.doStartTag();
                  if (_jspx_eval_content_Print_1 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                      try {
                          if (_jspx_eval_content_Print_1 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_Print_1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                              _jspx_th_content_Print_1.doInitBody();
                          }
                          do {
                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(24,2);to=(24,72)]
                          } while (_jspx_th_content_Print_1.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
                      } finally {
                          if (_jspx_eval_content_Print_1 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
                              out = pageContext.popBody();
                      }
                  }
                  if (_jspx_th_content_Print_1.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
                      return;
              } finally {
                  _jspx_th_content_Print_1.release();
              }
          // end
          // HTML // begin [file="/content_tags_example.jsp";from=(24,72);to=(25,2)]
              out.write("\n\t\t");

          // end
          // begin [file="/content_tags_example.jsp";from=(25,2);to=(25,74)]
              /* ----  content:Print ---- */
              com.ilmi.net.content.AContentPrintTag _jspx_th_content_Print_2 = new 
com.ilmi.net.content.AContentPrintTag();
              _jspx_th_content_Print_2.setPageContext(pageContext);
              _jspx_th_content_Print_2.setParent(_jspx_th_content_ShowContent_0);
              _jspx_th_content_Print_2.setType("content");
              _jspx_th_content_Print_2.setPrefix("<h1>Content</h1>");
              _jspx_th_content_Print_2.setSuffix("<BR>");
              try {
                  int _jspx_eval_content_Print_2 = 
_jspx_th_content_Print_2.doStartTag();
                  if (_jspx_eval_content_Print_2 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                      try {
                          if (_jspx_eval_content_Print_2 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_Print_2.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                              _jspx_th_content_Print_2.doInitBody();
                          }
                          do {
                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(25,2);to=(25,74)]
                          } while (_jspx_th_content_Print_2.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
                      } finally {
                          if (_jspx_eval_content_Print_2 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
                              out = pageContext.popBody();
                      }
                  }
                  if (_jspx_th_content_Print_2.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
                      return;
              } finally {
                  _jspx_th_content_Print_2.release();
              }
          // end
          // HTML // begin [file="/content_tags_example.jsp";from=(25,74);to=(26,2)]
              out.write("\n\t\t");

          // end
          // begin [file="/content_tags_example.jsp";from=(26,2);to=(26,68)]
              /* ----  content:Print ---- */
              com.ilmi.net.content.AContentPrintTag _jspx_th_content_Print_3 = new 
com.ilmi.net.content.AContentPrintTag();
              _jspx_th_content_Print_3.setPageContext(pageContext);
              _jspx_th_content_Print_3.setParent(_jspx_th_content_ShowContent_0);
              _jspx_th_content_Print_3.setType("date");
              _jspx_th_content_Print_3.setPrefix("<h1>Date</h1>");
              _jspx_th_content_Print_3.setSuffix("<BR>");
              try {
                  int _jspx_eval_content_Print_3 = 
_jspx_th_content_Print_3.doStartTag();
                  if (_jspx_eval_content_Print_3 != 
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                      try {
                          if (_jspx_eval_content_Print_3 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                              out = pageContext.pushBody();
                              
_jspx_th_content_Print_3.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                              _jspx_th_content_Print_3.doInitBody();
                          }
                          do {
                          // end
                          // begin 
[file="/content_tags_example.jsp";from=(26,2);to=(26,68)]
                          } while (_jspx_th_content_Print_3.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
                      } finally {
                          if (_jspx_eval_content_Print_3 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
                              out = pageContext.popBody();
                      }
                  }
                  if (_jspx_th_content_Print_3.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
                      return;
              } finally {
                  _jspx_th_content_Print_3.release();
              }
          // end
          // HTML // begin [file="/content_tags_example.jsp";from=(26,68);to=(31,1)]
              out.write("\n\t\ttest2.\n\n\t<A 
HREF=\"content_example.jsp?control=add\">Add new message</A>\n\t\n\t");

          // end
          // begin [file="/content_tags_example.jsp";from=(31,1);to=(31,23)]
          } while (_jspx_th_content_ShowContent_0.doAfterBody() == 
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
      } finally {
          if (_jspx_eval_content_ShowContent_0 != 
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
              out = pageContext.popBody();
      }
  }
  if (_jspx_th_content_ShowContent_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
      return;
} finally {
    _jspx_th_content_ShowContent_0.release();
}
// end
// HTML // begin [file="/content_tags_example.jsp";from=(31,23);to=(36,0)]
    out.write("\n\n\n </BODY>\n</HTML>\n");

[SNIP]

put the generated output HTML looks like this

<HTML>
 <HEAD>
   <TITLE>CONTENT TAGS EXAMPLES</TITLE>
 </HEAD>
 <BODY>






<h1>Testing content tags separated</h1>

        
<h1>Header</h1>Header1<BR><h1>Teaser</h1>Teaser1<BR><h1>Content</h1>Content1<BR><h1>Date</h1>


 </BODY>
</HTML>


So am i just stupid?? or is there some kind of a trick?? 

Thanx,
Tuukka




____________________________________________________________
Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
http://www.mail.lycos.com/brandPage.shtml?pageId=plus

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to