Sto cercando di inviare oggetti DTO da un jsp a un altro jsp usando jsp: include tag. Ma lo tratta sempre come String. Non riesco a usare DTO nel mio file jsp incluso.Come passare Object usando jsp: include il tag param in un altro jsp
Ecco un codice ..
<c:forEach items="${attributeDTOList}" var="attribute" varStatus="status">
<jsp:include page="attributeSubFeatureRemove.jsp" >
<jsp:param name="attribute" value="${attribute}" />
</jsp:include>
</c:forEach>
file di attributeSubFeatureRemove.jsp ..
<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>
Qui sto cercando di ottenere valore da attribuire param, è sempre l'invio di stringa tipo di valore. C'è un modo per inviare Object (DTO) in attributeSubFeatureRemove file jsp? Per favore aiuto.
@fiffy request.setAttribute vuole variabile. Come definirò la variabile? Esso deve essere impostato in questo modo $ {} sottoattributo –
Nessun quello non lavorano :( –
http://stackoverflow.com/a/13510064/2885897 – fiffy