<%@page import="javax.jdo.*,java.util.Iterator,PrjPackage.*"%> <%@page isThreadSafe="false" errorPage="/Exceptions.jsp" %> <%-- more efficient and safe in a website which is not too loaded --%> Category <%PersistenceManager pm = WebAppMgr.getPersistenceManager(); boolean download="download".equals(request.getParameter("mode")); try{ Object id = pm.newObjectIdInstance(Item.class,request.getParameter("id")); Category dir = (Category)pm.getObjectById(id, true);%> Category <%=dir.GetName()%>
    <% Iterator itr = dir.getFiles().iterator(); while (itr.hasNext()) { Item item = (Item)itr.next();%> <%if(item.GetConfirmItem()) {%>
     <%=item.ProgramName()%>

    File Size :-    <%=item.FileSize()%>
    Version:-    <%=item.ProgramVer()%>
    Cost:-    <%=item.ProgramCost()%>

       Download

      <%=item.ProgramDesc()%>

    <%}%> <%} %> <%if(!download){%> Back To Home<%} else{%> Back To Home<%}%> <%} catch(Exception x){ %>
    Number Of Category Not Correct !

    <%if(!download){%> Back To Home<%} else {%> Back To Home <%}%> <%} finally{ if(pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } pm.close(); }%>