| Folders | Files (if any) | Description (if available) |
|
This folder is the application root directory. It is therefore addressed from
JSP as a slash ('/'). Its actual path on the server is /opt/jakarta-tomcat/webapps/ROOT_zambon/ Of course, I haven't hardcoded the path. If you would like to see how I obtained it and displayed it in JSP, click on the folder_info.jsp tab in the second column of this table to display
the JSP document that generates this information block. Then, find in the
source code the <jsp:scriptlet> element.
This directory contains one subdirectory for each one of the tabs you see on
the top-left corner of this page (with the exclusion of Home),
plus one subdirectory named images (pretty standard, really) and
one named util, where I keep the JSP documents that I include in
several other JSP documents throughout the application.
|
folder_info.jspx and kept in the folders they describe.
The information regarding files named like filename.ext is
stored in files named filename_ext_info.jspx and kept in the
same folder of the file it describes. [Almost] useless to say, you will
not find any info file about info files.
Please note that I will not describe folders and files that are pretty
standard in this type of application. I will rather describe non-standard
aspects and application-specific algorithms and solutions.
The application is written in Java ServerPages (JSP) documents/pages and Java,
although you will also find some JavaScript and some CSS (Cascading Style
Sheet) documents, an example of which is
/util/css.jspx.
JSP documents (with extension jspx) are well formed
XML files containing JSP. These are not to be confused with JSP pages, which
are easier to write but do not conform to a formatting standard. The code
generated is XHTML. That is, HTML in XML format. Obviously, the best
way to learn JSP+XML+HTML is by reading my book
Beginning
JSPTM, JSFTM, and TomcatTM Web
Development: from Novice to Professional, published in
November 2007 by Apress
of Berkeley.
The oldest Java code is in
/daleks/java/daleks/
and
/webmines/java/webmines/webmines/. I wrote it
in 1998 (although I added a few things for this website, like what you will
find in
/webmines/java/webmines/webmines/tags/).
The oldest JSP code is in
/synervox/site/.
I wrote a large portion of it in 2002 and didn't have then any idea of what
the model-view-controller
(MVC)
application architecture was. I freely mixed in the JSP files database access
(the model of MVC), page presentation (the view) and application logic (the
controller). I have improved since then, but you will
not find in this website any pure MVC application. For example, for
the initial implementation of this page
(code.jspx)
relied on a Java class that generated HTML code, ready to be displayed in the
first column of this table. That was pretty bad. Moreover, because the list
of folders was generated inside a class, I had no way of expanding or
collapsing individual folders. I thought about using JavaScript, but I don't
like JavaScript. I decided to write everything in JSP. As a result, every
time you expand or collapse a folder, the whole page is reloaded. This might
not sound nice, but it has a clear advantage over using JavaScript: if you
return to the code page after looking at other pages, the folders that you
had expanded remain expanded. If you want to close all the folders and
refresh the list, you need to click on the # button in the top-left
corner of the table.
For this page, I moved from a JSP document to a JSP page, because a strict
XML implementation is sometimes a bother, and I got lazy.
I implemented a simple two-level-only JavaScript-based mechanism to expand
and collaps folders when I developed my Italian website
Espertissimi. If you are interested in how I
did it, look at the JavaScript in
/espertissimi/util/topic_box.jsp
and the expandable styles in
/espertissimi/util/quest.css.
I developed the website entirely with packages freely available on the
Internet.
.