JSP Documentation: directoryjsp2

click to see jsp layout
(links to documentjsp.jsp skelton (more representative))
reference to: <application server directory>

Documentation

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
  • if refresh set or new session, list all jsp files of the server and parse them
  • List files according to the following criteria
    • creation order (item #) column
    • file name (no case sensitive)
    • category of processing
todo
  • display modification date and allow ordering by dates
copyright Schneider-Electric 2001

Directives

<%@ include file="doInitPage.jsp" %>
<%@ page import="com.schneider_electric.ebase.jspdoc.split.*"%>

Anchors

<a href="/directoryjsp2.jsp?refresh=true">
<a href="/directoryjsp2.jsp">
<a href="/directoryjsp2.jsp?sort=Name">
<a href="/directoryjsp2.jsp?sort=Category">

Scriptlet Local Variables

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 ()

JSP Expressions

<%= servletContext.getRealPath("/") %>
<%= ((itCounter % 2)==0)?"listOddRow":"listEvenRow" %>
<%= itJspEntry[0] %>
<%= pharosDoc.hyperlink("/documentjsp.jsp?name=","\""+itJspEntry[1]+"\"",false) %>
<%= itJspEntry[2] %>
<%= pharosDoc.normalize(itJspEntry[3]) %>

Scriptlet expressions

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


SourceForge Logo