¿Cómo leer los atributos de acción de los fragmentos JSP incluidos con <jsp: include />?
Al intentar llamar a un captador de Action desde un JSP incluido, obtengo el valor nulo:
MyAction.java
private String message = "The message I want to read...";
public String getMessage() {
return message;
}
main.jsp
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head></head>
<body>
<div> I'm a DIV in main.jsp </div>
<jsp:include page="fragment.jsp" />
<body>
</html>
fragmento.jsp
<%@taglib prefix="s" uri="/struts-tags" %>
<div>
I'm a DIV from fragment.jsp
<br/>
Message from Action: <s:property value="message" />
</div>
¿Cómo puedo obtener el valor del atributo en el fragmento JSP?