You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/03/23 18:09:22 UTC
DO NOT REPLY [Bug 7392] New: -
A body tag without a body doesn't generate correct JSP code
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7392>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7392
A body tag without a body doesn't generate correct JSP code
Summary: A body tag without a body doesn't generate correct JSP
code
Product: Tomcat 4
Version: 4.0.3 Final
Platform: PC
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ddubinsky@salmonllc.com
A Taglib body tag that doesn't have a body doesn't execute properly. The
generated servlet treats it as an empty tag and doesn't call the doAfterBody
method.
For example, lets say you have a tag that mimics the HTML input tag where
sometimes the tag must be empty and sometimes it must have a body:
ex:
<custom:input type="select">
<custom:options....>
</custom:input>
or
<custom:input type="submit" value="click me"></custom:input>
The second example doesn't generate proper JSP code in the servlet. It only
calls the doStartTag method and not the doAfterBody method. A work around is to
code it like this:
<custom:input type="submit" value="click me"> </custom:input>
or
<custom:input type="submit" value="click me"/>
The first option would be kind of strange to explain to folks using the taglib.
The second option is nicer, but it doesn't work in other JSP environments where
a body tag must have a body and an empty tag must be empty (Bea Weblogic in
particular) and so the generated JSP stops being portable. Also, the syntax
<custom:input type="submit" value="click me"></custom:input>
worked fine in Tomcat 3. This is a major bug for me because I have a tool that
generates JSP code that I will have to rework unless I can get a fix and my
choices for what I can generate are limited to the "ugly" option:
<custom:input type="submit" value="click me"> </custom:input>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>