• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

setArribute, Struts, and JSP

Here is a code snippet from one struts action:

try{
             String isbn=request.getParameter("isbn");
             DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.FactoryImplementation.DB_DAO_FACTORY);
             BookDAO bao=factory.getBookDAO();
             Set<Section> sections=bao.getBook(new Isbn(isbn)).getSections();
             request.setAttribute("sections", sections);
             return mapping.findForward("success");
        }

It forwards to a list.jsp page.

In list.jsp page, how shall I display "sections"?

Shall I use

<logic:present name="sections">

or something else?

Thanks,
0
tiger0516
Asked:
tiger0516
  • 3
2 Solutions
 
ManishLeadCommented:
0
 
ManishLeadCommented:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now