Wie übergeben Objekt mit jsp:include param-tag in eine andere jsp

Ich versuche zu senden DTO-Objekt von einer jsp auf eine andere jsp mit jsp:include-tag. Aber es ist immer die Behandlung als String. Ich kann nicht in der Lage zu verwenden, DTO in meine jsp-Datei enthalten.

Hier ist ein code ..

<c:forEach items="${attributeDTOList}" var="attribute" varStatus="status">  
         <jsp:include page="attributeSubFeatureRemove.jsp" >
             <jsp:param name="attribute" value="${attribute}" />
         </jsp:include>
</c:forEach>

attributeSubFeatureRemove.jsp-Datei ..

<c:set value="${param.attribute}" var="attribute" />
<c:forEach items="${attribute.subFeatures}" var="subAttribute">
                                    <c:forEach items="${subAttribute.attributeValues}" var="subValue">
                                       <c:if test="${ subValue.preSelectionRequired}">
                                         <c:set var="replaceParams" value=":${subAttribute.name}:${subValue.name}" />
                                         <c:set var="removeURL" value="${fn:replace(removeURL, replaceParams, '')}" />
                                      </c:if>
                                    </c:forEach> 
                                    <jsp:include page="attributeSubFeatureRemove.jsp">
                                        <jsp:param name="subAttribute" value="${subAttribute}" />
                                     </jsp:include> 
</c:forEach>

Hier bin ich versucht zu bekommen-Attribut-Wert von param, es ist immer das senden von String Type Value. Gibt es eine Möglichkeit zu senden Objekt (DTO) in attributeSubFeatureRemove jsp-Datei ? Bitte helfen Sie.

Anfrage.setAttribute will-variable. Wie definiere ich Variablen? Es muss festgelegt werden, wie dies ${subAttribute}
Nein das funktioniert nicht 🙁
stackoverflow.com/a/13510064/2885897

InformationsquelleAutor Free-Minded | 2015-03-31

Schreibe einen Kommentar