Spring 3.2 with Tiles 3.
I have a JSP to set a c:set var value :
<c:set var="myValue" value="abcd" />
abcd here is just for brevity, its actually being manipulated in JSP.
This JSP I have included in Tiles definition of another JSP (Demo.jsp) like :
<put-attribute name="language" value="/WEB-INF/views/web/common/myValue.jsp" />
How can I access the value of myValue variable set in first JSP in my second JSP ?
Have you tried setting the scope of the variable to
request
so that it is available to other pages:The risk there is that the enclosing page (Demo.jsp) might attempt to access the variable before it has been set by the nested page. It may be better to refactor your JSPs so that the setting of the variable occurs elsewhere to avoid that temporal coupling.