Menu

where data come from to displaytag ???

Majid
2006-05-24
2012-10-09
  • Majid

    Majid - 2006-05-24

    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.

     
    • khsibr

      khsibr - 2006-06-20

      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.

MongoDB Logo MongoDB