You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2017/04/05 08:19:41 UTC
[jira] [Resolved] (WW-3659) strange behavior of s:a tag with
s:include tag inside
[ https://issues.apache.org/jira/browse/WW-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart resolved WW-3659.
-------------------------------
Resolution: Fixed
Assignee: Lukasz Lenart
I cannot reproduce this issue in the latest Struts 2.5.10.1 version, marking as fixed
> 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
> Assignee: Lukasz Lenart
> Priority: Minor
> Fix For: 2.5.next
>
> 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 was sent by Atlassian JIRA
(v6.3.15#6346)