[ 
https://issues.apache.org/jira/browse/WW-5124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451531#comment-17451531
 ] 

ASF subversion and git services commented on WW-5124:
-----------------------------------------------------

Commit cb0d0e770a63a415d280bdfe0e4f27b2cb2c883e in struts's branch 
refs/heads/master from JCgH4164838Gh792C124B5
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=cb0d0e7 ]

WW-5124 - Proposed fix for Struts JSP tag behaviour on application servers
that use tag pooling.
- Prior to this change, on application serves such as Glassfish, tag pools
that re-use tag instances demonstrated incorrect behaviour, due to
previous / old tag state still being present.
- Added new clearTagStateForTagPoolingServers() to StrutsBodyTagSupport.
It is called in doEndTag(), and descendants that override doEndTag()
should call the ancestor method or directly call
clearTagStateForTagPoolingServers().
- Unit test support methods were added to StrutsInternalTestCase and
AbstractTagTest.
- Basic sanity checks for existing unit tests were added where feasible.
They reflection-compare a tag's state after doEndTag() is called with that
of a new instance, to help catch if future changes miss calls in the
clearTagStateForTagPoolingServers() hierarchy.
- Removed some unused imports, added some missing override annotations
to classes that were modified as part of this change.

# Conflicts:
#       
core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java
#       core/src/main/java/org/apache/struts2/views/jsp/ui/AnchorTag.java
#       core/src/main/java/org/apache/struts2/views/jsp/ui/CheckboxTag.java
#       core/src/main/java/org/apache/struts2/views/jsp/ui/SubmitTag.java
#       core/src/test/java/org/apache/struts2/StrutsInternalTestCase.java
#       core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
#       core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java
#       core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
#       core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java

- Manually attempted to resolved conflicts.


> Tag attribute values cached
> ---------------------------
>
>                 Key: WW-5124
>                 URL: https://issues.apache.org/jira/browse/WW-5124
>             Project: Struts 2
>          Issue Type: Bug
>         Environment: Here you have a repo that reproduce this:
> https://github.com/dfliess/struts2-tagpooling-bug
>            Reporter: Diego Alejandro Fliess
>            Priority: Major
>             Fix For: 2.6
>
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> On some application servers, like glassfish, when handling jsp tag pooling, 
> attribute values are cached or not reinitiallized.
> For example:
> {code:java}
> <s:textfield size="50">
>     <jsp:attribute name="placeholder">THIS TEXTFIELD SHOULD HAVE 
> VALUE</jsp:attribute>
>     <jsp:attribute name="value">VALUE</jsp:attribute>
> </s:textfield>
> <s:textfieldsize="50">
>     <jsp:attribute name="placeholder">THIS TEXT FIELD SHOULDN'T HAVE 
> VALUE</jsp:attribute>
> </s:textfield>{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to