You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Alexander Visokov (JIRA)" <ji...@apache.org> on 2011/07/01 13:34:29 UTC

[jira] [Created] (WW-3659) strange behavior of s:a tag with s:include tag inside

strange behavior of s:a tag with s:include tag inside
-----------------------------------------------------

                 Key: WW-3659
                 URL: https://issues.apache.org/jira/browse/WW-3659
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Convention, Plugin - Tiles, Value Stack
    Affects Versions: 2.2.3, 2.2.1.1
         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
            Reporter: Alexander Visokov
            Priority: Critical


I have two files.

test.jsp
--------
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="depId" value="1" scope="page"/>
<s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
	<s:include value="test2.jsp"/>
</s:a>

test2.jsp
---------
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="test" value="1" scope="page"/>
1

The result of call http://localhost:8080/myapp/test.jsp is:
<a id="1" href="javascript:some-javascript-method('')">1</a>

as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
<a id="1" href="javascript:some-javascript-method('1')">1</a>

Is this a bug or I do not understand something in Struts2 :)


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maurizio Cucchiara updated WW-3659:
-----------------------------------

          Component/s:     (was: Plugin - Convention)
                           (was: Plugin - Tiles)
                           (was: Value Stack)
                       Unit Tests
                       Plugin - Tags
                       Plugin - CodeBehind
          Description: 
I have two files.


{code:title=test.jsp}
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="depId" value="1" scope="page"/>
<s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
	<s:include value="test2.jsp"/>
</s:a>
{code}

{code:title=test2.jsp}
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="test" value="1" scope="page"/>
1
{code}
The result of call http://localhost:8080/myapp/test.jsp is:
{code}
<a id="1" href="javascript:some-javascript-method('')">1</a>
{code}
as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
{code}
<a id="1" href="javascript:some-javascript-method('1')">1</a>
{code}

Is this a bug or I do not understand something in Struts2 :)


  was:
I have two files.

test.jsp
--------
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="depId" value="1" scope="page"/>
<s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
	<s:include value="test2.jsp"/>
</s:a>

test2.jsp
---------
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<s:set name="test" value="1" scope="page"/>
1

The result of call http://localhost:8080/myapp/test.jsp is:
<a id="1" href="javascript:some-javascript-method('')">1</a>

as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
<a id="1" href="javascript:some-javascript-method('1')">1</a>

Is this a bug or I do not understand something in Struts2 :)


             Priority: Minor  (was: Critical)
    Affects Version/s:     (was: 2.2.1.1)
                Flags:   (was: [Important])

Downgraded to minor priority as it is an unusual case

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - CodeBehind, Plugin - Tags, Unit Tests
>    Affects Versions: 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Minor
>         Attachments: StrutsBugTest.war, WW-3659.patch
>
>
> I have two files.
> {code:title=test.jsp}
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> {code}
> {code:title=test2.jsp}
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> {code}
> The result of call http://localhost:8080/myapp/test.jsp is:
> {code}
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> {code}
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> {code}
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> {code}
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Visokov reopened WW-3659:
-----------------------------------


I do not understand comment about struts filter. In my app struts filter triggers on all pages.

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Visokov updated WW-3659:
----------------------------------

    Attachment:     (was: StrutsBugTest.war)

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058509#comment-13058509 ] 

Alexander Visokov commented on WW-3659:
---------------------------------------

Hmm... 
Struts filter triggers on all pages in my app.

web.xml
-------
<filter>
  <filter-name>struts2</filter-name> 
  <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> 
</filter>
<filter-mapping>
  <filter-name>struts2</filter-name> 
  <url-pattern>/*</url-pattern> 
</filter-mapping>



> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Lukasz Lenart (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3659:
------------------------------

    Fix Version/s: 3.x
    
> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - CodeBehind, Plugin - Tags, Unit Tests
>    Affects Versions: 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: StrutsBugTest.war, WW-3659.patch
>
>
> I have two files.
> {code:title=test.jsp}
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> {code}
> {code:title=test2.jsp}
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> {code}
> The result of call http://localhost:8080/myapp/test.jsp is:
> {code}
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> {code}
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> {code}
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> {code}
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058516#comment-13058516 ] 

Dave Newton commented on WW-3659:
---------------------------------

Check out the filter source code. Original comment is correct.

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maurizio Cucchiara closed WW-3659.
----------------------------------

    Resolution: Not A Problem

Don't call the jsp directly, otherwise struts filter is not triggered. Ask this kind of question to the user ML


> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058517#comment-13058517 ] 

Lukasz Lenart commented on WW-3659:
-----------------------------------

Could you first post your question to user group ?

user@struts.apache.org>

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3659:
------------------------------

    Attachment: WW-3659.patch

Patch that solves the problem but can break backward compatibility

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>         Attachments: StrutsBugTest.war, WW-3659.patch
>
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Newton updated WW-3659:
----------------------------

    Comment: was deleted

(was: Check out the filter source code. Original comment is correct.)

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058535#comment-13058535 ] 

Alexander Visokov commented on WW-3659:
---------------------------------------

Posted

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Visokov updated WW-3659:
----------------------------------

    Attachment: StrutsBugTest.war

I've created test-project (attached StrutsBugTest.war). In it I call test.action (at index.html) resulting to test.jsp. The same strange behavior.

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>         Attachments: StrutsBugTest.war
>
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3659) strange behavior of s:a tag with s:include tag inside

Posted by "Alexander Visokov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Visokov updated WW-3659:
----------------------------------

    Attachment: StrutsBugTest.war

Reattach

> strange behavior of s:a tag with s:include tag inside
> -----------------------------------------------------
>
>                 Key: WW-3659
>                 URL: https://issues.apache.org/jira/browse/WW-3659
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention, Plugin - Tiles, Value Stack
>    Affects Versions: 2.2.1.1, 2.2.3
>         Environment: Windows XP SP3, Java SE 1.6.0_02 build 06, Apache tomcat 7.0.8
>            Reporter: Alexander Visokov
>            Priority: Critical
>         Attachments: StrutsBugTest.war
>
>
> I have two files.
> test.jsp
> --------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="depId" value="1" scope="page"/>
> <s:a id="%{#attr.depId}" href="javascript:some-javascript-method('%{#attr.depId}')">
> 	<s:include value="test2.jsp"/>
> </s:a>
> test2.jsp
> ---------
> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <s:set name="test" value="1" scope="page"/>
> 1
> The result of call http://localhost:8080/myapp/test.jsp is:
> <a id="1" href="javascript:some-javascript-method('')">1</a>
> as we can see, second evaluation of %{#attr.depId} is missing (must be javascript:some-javascript-method('1')). I cannot understand why it happens. 
> But when I remove line <s:set name="test" value="1" scope="page"/> from test2.jsp file and call again I receive correct result:
> <a id="1" href="javascript:some-javascript-method('1')">1</a>
> Is this a bug or I do not understand something in Struts2 :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira