JSP Documentation: directoryjsp2 |
click to see jsp layout (links to documentjsp.jsp skelton (more representative)) |
reference to: <application server directory> |
name | directory2.jsp |
category | System |
summary | List all jsp files with category and summary |
history | <date>10/08/01 us</date> Gilbert Brault <action> creation</action> |
<date>10/25/01 us</date> Gilbert Brault <action> adapted pharos:foreach switch itCounter to Integer (was int before)</action> | |
outline |
|
todo |
|
copyright | Schneider-Electric 2001 |
<%@ include file="doInitPage.jsp" %> |
<%@ page import="com.schneider_electric.ebase.jspdoc.split.*"%> |
<a href="/directoryjsp2.jsp?refresh=true"> |
<a href="/directoryjsp2.jsp"> |
<a href="/directoryjsp2.jsp?sort=Name"> |
<a href="/directoryjsp2.jsp?sort=Category"> |
ServletContext servletContext = pageContext.getServletContext () |
ArrayList jspDirectory |
ServletContext context = getServletContext () |
PharosDir pharosDir = ( PharosDir ) context.getAttribute ( "pharosDir" ) |
PharosDoc pharosDoc = new PharosDoc () |
String sort = request.getParameter ( "sort" ) |
int cas = 0 |
TreeSet itListByName = null |
TreeSet itListByCategory = null |
Collection itJspEntryList = ( Collection ) jspDirectory |
int itCounter = 0 |
Iterator it = itJspEntryList.iterator () |
String itJspEntry[] = ( String [] ) it.next () |
<%= servletContext.getRealPath("/") %> |
<%= ((itCounter % 2)==0)?"listOddRow":"listEvenRow" %> |
<%= itJspEntry[0] %> |
<%= pharosDoc.hyperlink("/documentjsp.jsp?name=","\""+itJspEntry[1]+"\"",false) %> |
<%= itJspEntry[2] %> |
<%= pharosDoc.normalize(itJspEntry[3]) %> |
pageContext.getServletContext () |
getServletContext () |
context.getAttribute ( "pharosDir" ) |
( pharosDir == null ) |
pharosDir |
( request.getParameter ( "refresh" ) != null ) |
request.getParameter ( "refresh" ) |
new PharosDir () |
pharosDir.load ( servletContext.getRealPath ( "/" ) ) |
servletContext.getRealPath ( "/" ) |
context.setAttribute ( "pharosDir" , pharosDir ) |
new PharosDoc () |
jspDirectory |
pharosDir.getJspDirectory () |
request.getParameter ( "sort" ) |
sort |
sort.toLowerCase () .equals ( "Name" .toLowerCase () ) |
cas |
itListByName |
pharosDir.orderedByName () |
sort.toLowerCase () .equals ( "Category" .toLowerCase () ) |
itListByCategory |
pharosDir.orderedByCategory () |
itJspEntryList |
itJspEntryList.iterator () |
it.hasNext () |
it.next () |
itCounter |