[jboss-jira] [JBoss JIRA] (WFLY-3393) JSP 2 different tags called with same tag instance

roy mizrachi (JIRA) issues at jboss.org
Tue Jun 10 04:23:15 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974772#comment-12974772 ] 

roy mizrachi edited comment on WFLY-3393 at 6/10/14 4:21 AM:
-------------------------------------------------------------

Hi Again,
Attached is the reproducer (test.war).

please deploy this and call http://<host>:<port>/Test/test.do

You can see that we have here 4 tags (Test.jsp).
However the constructor is only called 1 time (org.apache.struts.taglib.html.TestTextTag).
Also the release is never called (Should be called after each tag doEndTag called).
For your convenient i added system.out.println logs.

Also below is the should be JSP tag life cycle from(http://java.boot.by/wcd-guide/ch10.html):

Table 10.1. Tag Handler Methods

Tag Type	Interface	Methods
Basic	Tag	doStartTag, doEndTag
Attributes	Tag	doStartTag, doEndTag, setAttribute1, ..., setAttributeN , release
Body	Tag	doStartTag, doEndTag, release
Body, iterative evaluation	IterationTag	doStartTag, doAfterBody, doEndTag, release
Body, manipulation	BodyTag	doStartTag, doInitBody, doAfterBody, doEndTag, release


Hope this helps,
Roi


was (Author: roim):
Hi Again,
Attached is the reproducer (test.war).

please deploy this and call http://<host>:<port>/Test/test.do

You can see that we have here 4 tags (Test.jsp).
However the constructor is only called 1 time (org.apache.struts.taglib.html.TestTextTag).
Also the release is never called (Should be called after each tag ends to be compiled).
For your convenient i added system.out.println logs.

Also below is the should be JSP tag life cycle from(http://java.boot.by/wcd-guide/ch10.html):

Table 10.1. Tag Handler Methods

Tag Type	Interface	Methods
Basic	Tag	doStartTag, doEndTag
Attributes	Tag	doStartTag, doEndTag, setAttribute1, ..., setAttributeN , release
Body	Tag	doStartTag, doEndTag, release
Body, iterative evaluation	IterationTag	doStartTag, doAfterBody, doEndTag, release
Body, manipulation	BodyTag	doStartTag, doInitBody, doAfterBody, doEndTag, release


Hope this helps,
Roi

> JSP 2 different tags called with same tag instance
> --------------------------------------------------
>
>                 Key: WFLY-3393
>                 URL: https://issues.jboss.org/browse/WFLY-3393
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Web (Undertow)
>    Affects Versions: 8.1.0.CR2
>            Reporter: roy mizrachi
>            Assignee: Stuart Douglas
>         Attachments: test.war
>
>
> When working with JSP tags on struts i can see that sometimes 2 diffrent tags with same type is called with the same instance.
> Example:
> JSP
>  <jcv:text id="email" maxlength="255" property="valueObject.Email"/>          
>  <br>
>  <jcv:text id="phone" maxlength="255" property="valueObject.Phone"/>
> TLD
> <tag>
>         <name>text</name>
>         <tagclass>tti.jcore.views.form.tag.JViewsTextTag</tagclass>
> ...
> </tag>
> I can see that the public int doStartTag() called for both with the same instance.
>         



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list