<%@ include file="doInitPage.jsp" %> <%@ page import="com.schneider_electric.ebase.jspdoc.split.*" %> <% /** directory2.jsp System List all jsp files with category and summary 10/08/01 us Gilbert Brault creation 10/25/01 us Gilbert Brault adapted pharos:foreach switch itCounter to Integer (was int before) Schneider-Electric 2001 */ %> <% /* Open a jsp file and tries some jspdoc stuff */ ServletContext servletContext = pageContext.getServletContext(); %>

JSP Directory summary

<%= servletContext.getRealPath("/") %> refresh
<% ArrayList jspDirectory; ServletContext context = getServletContext(); PharosDir pharosDir = (PharosDir)context.getAttribute("pharosDir"); if ( (pharosDir == null) || (request.getParameter("refresh")!=null) ){ pharosDir = new PharosDir(); pharosDir.load(servletContext.getRealPath("/")); context.setAttribute("pharosDir",pharosDir); } PharosDoc pharosDoc = new PharosDoc(); jspDirectory = pharosDir.getJspDirectory(); String sort = request.getParameter("sort"); if (sort==null) sort =""; int cas = 0; TreeSet itListByName=null; TreeSet itListByCategory = null; if (sort.toLowerCase().equals("Name".toLowerCase())) { cas=1; itListByName = pharosDir.orderedByName(); } if (sort.toLowerCase().equals("Category".toLowerCase())) { cas=2; itListByCategory = pharosDir.orderedByCategory(); } Collection itJspEntryList= (Collection)jspDirectory; if (cas==1) itJspEntryList= (Collection)itListByName; if (cas==2) itJspEntryList= (Collection)itListByCategory; %> <% int itCounter = 0; for(Iterator it = itJspEntryList.iterator(); it.hasNext(); ){ String itJspEntry[] = (String[]) it.next(); itCounter++; %> "> <% } %>
item file category summary
<%= itJspEntry[0] %> <%= pharosDoc.hyperlink("/documentjsp.jsp?name=","\""+itJspEntry[1]+"\"",false) %> <%= itJspEntry[2] %> <%= pharosDoc.normalize(itJspEntry[3]) %>