Package Organization Of Expresso
This document describes the source code package organization of Expresso and the file structure of the Expresso web-application.
The structure of both of these has undergone reorganization to be more logical and easier to understand. This structure only applies to Expresso 3.00 or later. If you are converting from an earlier release, see the documentation about the re-name utility.
Please refer to the JavaDoc for the most up-to-date details on the structure.
All Expresso packages are within "com.jcorporate.expresso". Inside this are 4 major sub-categories:
- com.jcorporate.expresso.core
The core classes required of virutally every
expresso application such as db persistance, security, state-machine, etc. Within this package:
- ExpressoSchema - the primary Schema object for Expresso. This schema object registers all of the other required objects for Expresso.
Sub-packages:
- cache - The general-purpose Cache Manager, which manages all in-memory caches for Expresso.
- controller - The core definitions of Expresso's Controller objects
- db - Database connection pool and database connection definitions
- dbobj - Core definitions of database objects
- job - Definitions of the Job class for background and scheduled job handling
- jsdkapi - Objects to support multiple versions of the servlet API
- logging - Expresso's interface to the log4j logging package, as well as appenders for database logging
- misc - Miscellanous objects, including the ConfigManager, which holds all of Expresso's configuration properties and is responsible for system startup.
- security - The security sub-system, including links to both weak and strong encryption.
- servlet - Basic servlets for Expresso, including DBMaint.
- utility - Stand-alone utility programs - e.g. containing a "main" method and intended to be run from the command-line. This includes ReNameUtil, DBTool, JobHandler and others.
- com.jcorporate.expresso.services
Additional services that are still part of basic Expresso, but not strictly necessary to an Expresso application. Such as: downloading, email verification, etc. Sub-packages include:
- controller - Contains Controller objects used to administer Expresso, Queue Jobs, control the CahceManager, and other common functions.
- dbobj - Contains database objects used in essential Expresso services, such as security, job queueing, logging.
- html - A simple package for generating HTML, used by basic servlets. See Controller objects for more sophisticated UI options.
- job - Some basic Job objects
- servlet - Basic servlets used in Expresso, including DBCreate, Status, and others.
- test - The definitions for the basic unit-test framework used in Expresso. Currently being integrated with Junit.
- com.jcorporate.expresso.ext
Extensions to Expresso that will be used by some Expresso applications, but not by others.
This will be the place to put any future bells and whistles.
Some sub-packages in this package will not compile under certain
systems - e.g. the "ldap" sub-package requires the jndi and ldap extension packages (available as downloads from Sun). These packages can safely be ignored on systems that do not require or utilize them.
- dbobj - DB object definitions for extension services such as downloading, download logging, and self-registration of users.
- job - Jobs for extension services such as sending email notifications to users who download certain files.
- ldap - LDAP integration objects for reading security info from an LDAP server - required JNDI.
- report - Extension reports including analysis of users who have downloaded files
- servlet - Extension servlets, such as a Restart servlet (to re-read configuration values), export DB objects to XML format, and a servlet to run arbitrary SQL queries.
- com.jcorporate.expresso.demo
Classes that are to show the functionality
of expresso such as Login/Logout, RegisterUser, etc. Classes in this
package are intended to be used as examples of how Expresso can be used. Classes in this package can be safely removed without compromising any of Expresso's functionality.
The "demo" sub-package is actually an entire Expresso application, and
has it's own Schema class, com.jcorporate.demo.DemoSchema.
Expresso CVS organization
The organization of Expresso's files in CVS is designed to allow Expresso
to be easily packaged into a .EAR (Enterprise Application) or
.WAR (Web application Archive) format file. This
format allows Expresso to be immediately deployed on servers supporting this
format.
If you were to check out the Expresso CVS archive into a directory called
"expresso", you would see a structure like this:
- expresso/
This would be the top-level directory if you were packaging Expresso into a .ear file (Enterprise Application)
- META-INF/ - Directory required by the Enterprise Application structure.
- application.xml
- Definition file required by Enterprise Application structure.
- expresso-ejb/ - Not used yet. Would contain definition of the enterprise beans (EJB's) used by this application.
- expresso-web/ - Top-level directory for Expresso as a web-application.
- frame.jsp
- The "welcome" file, or initial file in Expresso. This is the file your browser is directed to when you first enter this web-application.
- toc.jsp
- applications.jsp - Page used to "register" Expresso applications.
- error.jsp - Standard error handling page for Expresso and Expresso applications.
- header.jsp - Frame header page.
- LICENSE - File detailing the license under which Expresso is related and the licenses of other 3rd party packages integrated into Expresso.
- main.jsp
- operation.jsp - Expresso's Operations page.
- README
- security.jsp - Expresso's Security administration page.
- setup.jsp - Expresso's Setup page.
- SUPPORT - File explaining support procedures and the availability of paid premium support.
- config/ - This directory is the initial configuration directory, pointed to by web.xml in the WEB-INF subdirectory discussed below. It is recommended that this be moved to a more secure location for production deployment.
- expresso-config.xml - This is the default properties file for Expresso, initially configured to use the supplied Hypersonic database. See the EDG expresso-config.xml documentation for details.
- expressoLogging.xml - This file configures the log4j logging sub-system integrated into Expresso. See the logging documentation for details.
- db/ - Files for an example Hypersonic SQL database with Expresso tables already created
- doc/ - Expresso documentation, of which this document is a part
- help/ - Help files in HTML format.
- images/ - Default image files.
- javadoc/ - Javadoc documentation for Expresso
- jsp/ - Various JSP files used in Expresso administration
- log/ - Log files are located in this directory by default. It is recommended that log4j.xml be edited to specify a more secure location.
- style/ - The default style sheet (default.css) is located in this directory
- components/ - This sub-directory contains a directory for each Expresso application (e.g. eForum, ePoll, eSearch, etc)
- eforum/
- epoll/
- esearch/
- demo/
-
WEB-INF/ - This directory, specified in the .WAR specification, contains the java classes for Expresso and all other classes required by this web-application.
- lib/ - This directory is where any .jar files can be placed for the application's use. This is where .jar files containing JDBC drivers for any databases other than the included Hypersonic DB should be placed.
- classes/
- com/
- jcorporate/
- expresso/
- All .class and .java files for Expresso. Sub-directories within this directory correspond to the package organization discussed above. Note that CVS only contains the .java files, but that downloadable distributions of Expresso contain both the .class and .java files.
- esearch/ - All .class and .java files for eSearch
- eforum/ - All .class and .java files for eForum
- epoll/ - All .class and .java files for ePoll
- web.xml - This file, defined by the Web Application specification, contains informating defining this web application, including registration of all servlets.