Set.html: String name Deprecated. Use 'var' insteadchange attribute name="depId" to var="depId"
Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Date: Fri, 1 Jul 2011 18:30:22 +0400 > Subject: Re: strange behavior of s:a tag with s:include tag inside > From: nod...@gmail.com > To: user@struts.apache.org > > I've created test project (attached StrutsBugTest.war) in jira. In that > project you can click to the link in index.html and see the same strange > behavior. > > 1 июля 2011 г. 17:28 пользователь Dave Newton <davelnew...@gmail.com>написал: > > > Unless the JSP is processed through an action, the original comment in the > > jira ticket is correct. > > > > Recall that a filter can stop processing a request, which is what happens > > if > > it's not a request that hits an action. > > > > Dave > > On Jul 1, 2011 8:59 AM, "Александр Высоков" <nod...@gmail.com> wrote: > > > Hello all. > > > > > > 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? > > > > > > -- > С уважением, Александр.