Hi, I am new to displaytag, please show me where to put data in a struts action to forward it to a jsp page that has a displaytag. thanks.
mlotfi
to access to your data from a JSP, you have to put it in request scope or session scope.
//code to put an object in the request scope request.setAttribute("listElements", list);
Then, in the JSP, you can load your object and use it as an entry to displayTag:
//code to get the object from request scope <jsp:useBean id="listElements" scope="request" type="objectClass" />
khsibr
Log in to post a comment.
Hi, I am new to displaytag,
please show me where to put data in a struts action to forward it to a jsp page that has a displaytag.
thanks.
mlotfi
to access to your data from a JSP, you have to put it in request scope or session scope.
//code to put an object in the request scope
request.setAttribute("listElements", list);
Then, in the JSP, you can load your object and use it as an entry to displayTag:
//code to get the object from request scope
<jsp:useBean id="listElements" scope="request"
type="objectClass" />
khsibr