struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola de Saint-Aubert" <>
Subject JSP local scope / include con object domain visibility control
Date Thu, 08 Apr 2010 11:53:43 GMT


We wonder how to control the visibility of object put in the stack when
including a jsp in another one.

We do know the action/request/page … scope and the include tag

But we have a need for another JSP level scope and include tag with the
following characteristic:

-          the scope has the JSP life time

-          some (input) scope objects can be injected from a parent jsp via
a include tag into a the child jsp scope

-          some (output) scope objects can be backwarded from a child jsp
into the parent jsp scope when returning the include tag.

-          we want to access the JSP scope variables using the common Struts
way (# operator), this scope being the prior one.

We insist that we want to pass object that might be complex (and not only


Did any one have to face with this problem? Is their a way for implementing
such a feature in struts?




<s:set name=”myParentScopeObjectName” value=”%{myObj}” scope=”JSP”/>


<s:include value=”Child.jsp”>

            <s:inputparam name=”myParentScopeObjectName” to=”myInputName”/>
//myInputName is injected in the Child JSP scope as reference to the object

            <s:outputparam name=”myChildScopeObjectName”  to=”myOutputName”
// myChildScopeObjectName (of Child JSP scope) is injected in Parent JSP
scope as myOutputName



<s:property value=”#myOutputName”/>



<s:property value=”#myInputName”/>

<s:set name=” myChildScopeObjectName” value=”%{myChildObj}” scope=”JSP”/>


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message