[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2017-07-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #10 from M. Manna  ---
Hello,

We would like to go for TC 8.5.14 or 8.5.15. Will this patch be available
there?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

Remy Maucherat  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #9 from Remy Maucherat  ---
I applied the patch and it will be included in 9M16, 8.5.10, 8.0.40, 7.0.74 and
6.0.49. It is possible the new behavior gets reintroduced in 8.5 and 9 after it
is reviewed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

Remy Maucherat  changed:

   What|Removed |Added

  Attachment #34540|0   |1
is obsolete||

--- Comment #8 from Remy Maucherat  ---
Created attachment 34544
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34544&action=edit
Reuse exclusion and try/finally for simple tags

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-21 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #7 from Wai-Kau Lo  ---
Created attachment 34543
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34543&action=edit
Test web application

Attached is a self-contained web application that can be used to replicate the
issue.

After deploying the test.war file on a Tomcat Server of version 8.5.5 (or
higher up to 8.5.9), access the following two URLs in sequence:

1) http://localhost:8080/test/test/page1.jsp
You will receive a NullPointerException from page2.jsp as expected.
java.lang.NullPointerException
org.apache.jsp.test.page2_jsp._jspService(page2_jsp.java:151)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)



2) http://localhost:8080/test/test/page1.jsp?childName=name
Instead of the expected response shown below

Parent Name: Parent1 
Child Name: name contains 4 characters

you will receive the following JspException:
javax.servlet.jsp.JspException: No getter method for property: "children" of
bean: "form"
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:987)
   
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
   
org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(NestedIterateTag.java:73)
org.apache.jsp.test.page2_jsp._jspService(page2_jsp.java:135)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
..

This is caused by the "corrupted" nested:iterate tag instance cached in the tag
pool after processing the first URL.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #6 from Remy Maucherat  ---
Created attachment 34540
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34540&action=edit
Change reuse logic

I'm not convinced by the explanation. Adding some more complexity to the
generated code if the issue is found to be legitimate. And for review too.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #5 from Wai-Kau Lo  ---
I think the JSP spec clearly states that we should not reuse a JSP tag instance
if its doStartTag method execution raises an exception, as I explained in my
previous comment.

Also, this is clearly a regression issue introduced by changset set 1754112 in
Tomcat 8.5.5, which fortunately has not been ported back to the Tomcat 9.0
release branch.  I am hoping we can roll back this changeset in the Tomcat 8.5
release branch.

Finally, JSP Custom Tag Pooling has been highlighted in the "Jasper 2 JSP
Engine How To" section as a significant performance booster.

JSP Custom Tag Pooling - The java objects instantiated for JSP Custom Tags can
now be pooled and reused. This significantly boosts the performance of JSP
pages which use custom tags.

Since our application depends heavily on custom tags, I am just hesitant to
simply turn off tag pooling with conducting some performance tests first. 
In the meantime, I guess the only recourse is to compile my own Jasper engine.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #4 from Remy Maucherat  ---
I didn't find anything that was very clear either, which is why I asked. I'd
recommend you disable tag pooling for now, it's probably not that useful
anymore.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #3 from Wai-Kau Lo  ---
Page 2-54 of the JavaServer Pages Specification version 2.0 describes the
lifecycle of a JSP tag instance using a state transition diagram, which I have
uploaded to this bug as an attachment (named JSP Tag Lifecycle Diagram) for
ease of reference.  The state transitions are described as follows:

•[1] This transition is intended to be for releasing long-term data. no
guarantees are assumed on whether any properties have been retained or not.

•[2] This transition happens if and only if the tag ends normally without
raising
an exception

•[3] Some setters may be called again before a tag handler is reused. For
instance, setParent() is called if it’s reused within the same page but at a
different level, setPageContext() is called if it’s used in another page, and
attribute setters are called if the values differ or are expressed as
request-time attribute values.

Label [2] corresponds to the state transition caused by the execution of the
doEndTag method, after the doStartTag method is execution. This implies that
the doEndTag method should not be executed if the doStartTag method execution
raises an exception.  Since the doEndTag method is not executed, the tag
instance will not be in a proper state for the next execution of the
doStartTag, implying that we should never reuse the tag instance if the
doStartTag method raises an exception during its execution.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #2 from Wai-Kau Lo  ---
Created attachment 34534
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34534&action=edit
JSP Tag Lifecycle Diagram

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

--- Comment #1 from Remy Maucherat  ---
(In reply to Wai-Kau Lo from comment #0)
> This violates the JSP specification that specifies
> that JSP tags should never be reused in case of an exception.

Can you provide the spec language which states this ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60497] JSP custom tags returned to the tag pools to be reused without executing the doEndTag method

2016-12-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497

Michael Osipov <1983-01...@gmx.net> changed:

   What|Removed |Added

 CC||1983-01...@gmx.net

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org