DO NOT REPLY [Bug 7392] - A body tag without a body doesn't generate correct JSP code

2003-03-26 Thread bugzilla
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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-03-27 02:24 ---
All the tag handler lifecycle methods have been clarified in the
upcoming JSP 2.0 spec.

The latest javax.servlet.jsp.tagext.BodyTag, available from
jakarta-servletapi-5/jsr152, has this:

 * pNote that which methods are invoked after the doStartTag() depends on 
 * both the return value and on if the custom action element is empty
 * or not in the JSP page, not how it's declared in the TLD.
 *
 * p
 * If SKIP_BODY is returned the body is not evaluated, and doEndTag() is
 * invoked.
 *
 * p
 * If EVAL_BODY_INCLUDE is returned, and the custom action element is not
 * empty, setBodyContent() is not invoked,
 * doInitBody() is not invoked, the body is evaluated and
 * passed through to the current out, doAfterBody() is invoked
 * and then, after zero or more iterations, doEndTag() is invoked.
 * If the custom action element is empty, only doStart() and 
 * doEndTag() are invoked.
 *
 * p
 * If EVAL_BODY_BUFFERED is returned, and the custom action element is not
 * empty, setBodyContent() is invoked,
 * doInitBody() is invoked, the body is evaluated, doAfterBody() is
 * invoked, and then, after zero or more iterations, doEndTag() is invoked.
 * If the custom action element is empty, only doStart() and doEndTag() 
 * are invoked.

This means that if doStartTag() returns SKIP_BODY, or if it returns
EVAL_BODY_INCLUDE or EVAL_BODY_BUFFERED and the custom action element
is empty, doAfterBody() will *NOT* be invoked.

Please do not reopen this bug, as what you are requesting contradicts the JSP
spec. Place your logic in doEndTag() instead.

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



DO NOT REPLY [Bug 7392] - A body tag without a body doesn't generate correct JSP code

2002-12-20 Thread bugzilla
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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2002-12-20 21:22 ---
There is a possibility where the tag may not have a body. In that case the jsp 
has been coded as a valid empty tag. But this Means that doAfter body will 
never be called. And when the tag handler returns the content to be placed as 
body, it will be never able to do so, inspite of the tag definition being the 
right xml.

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




DO NOT REPLY [Bug 7392] - A body tag without a body doesn't generate correct JSP code

2002-03-29 Thread bugzilla

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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX
Summary|A body tag without a body   |A body tag without a body
   |doesn't generate correct JSP|doesn't generate correct JSP
   |code|code



--- Additional Comments From [EMAIL PROTECTED]  2002-03-29 21:23 ---
In a xml document, tag ... / and tag .../tag both represent an empty
element and are syntatically equivalent (see
http://www.w3.org/TR/REC-xml#NT-ETag).  I doubt that you can use the first form
as a workaround to your problm, while the second form fails.  In both cases,
doAfterBody will not be invoked, for an empty tag.

A easy workaround is to insert a space or '\n' between the Stag and Etag:

custom:input type=submit value=click me /custom:input
or
custom:input type=submit value=click me
/custom:input

BTW, why can't you use doEnTag instead of doAfterBody for empty tags?

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




DO NOT REPLY [Bug 7392] - A body tag without a body doesn't generate correct JSP code

2002-03-29 Thread bugzilla

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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |



--- Additional Comments From [EMAIL PROTECTED]  2002-03-29 21:39 ---
Tools (Dreamweaver in particular) sometimes interprets the space or the line 
feed as white space and removes it when you do a code format. This is how the 
problem came up. Somebody did a code format and all their input fields 
disappeared.

Also it's hard to explain to people using our tag library that
tag /tag will work and tag/tag won't.

This is a big problem for me. If I hack through the Jasper code and fix it 
myself, would you consider incorporating the change into the official version.

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




DO NOT REPLY [Bug 7392] - A body tag without a body doesn't generate correct JSP code

2002-03-29 Thread bugzilla

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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-03-29 22:00 ---
JSP.10.1 says:

   Empty and Non-Empty Actions
An empty action has no body; it may use one of the two syntaxes: either
foo/ or foo/foo.  Since empty actions have no body the methods related to
body manipulation are not invoked.

It is pretty clear that doAfterBody should not be invoked for empty tags. 
Period.

You should not be doing things in doAfterBody for tags that are empty, in the
first place.  Like I suggested, try doing what you want in doEndTag instead.

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