Expresso Pre-Requisites

Expresso is not only open source, but with Expresso complete it is very straightforward install. You can simplify the server and database steps in the prerequisites by using the Expresso Complete bundle, which has the Tomcat servlet container already bundled and configured with Expresso.

Without Expresso complete there is addition pre-requisites that make it straightforward ONLY IF, you have all the pre-requisites in place. It is suggested that this be attacked as a completely separate project, and completed before any attempt at installing Expresso is made.

Version:

Expresso 5.5

Maintainer:

Sandra Cann

Introduction

These are all things that you would have to do eventually anyway, and in that sense have nothing to do with Expresso. But if my experience is any guide, it can be troublesome to attempt to get Expresso up with pieces missing. You will get mad at Expresso, but Expresso won't be the problem. The prerequisites include:

Expresso Complete Installation

You can simplify the server and database steps in the prerequisites by using the Expresso Complete bundle. We recommend using the Expresso Complete bundle, which has the Tomcat servlet container already bundled and configured with Expresso, and is therefore much easier to install.

Installing Expresso from the "expresso complete" bundle reduces the number of things you have to worry about having set up ahead of time. Use the Expresso Complete Installation Instructions for the "-complete.jar" download file.

Server Setup

This section may be unnecessary, skip this step if you are using the Expresso compete bundle which includes the Tomcat servlet container already bundled. Setting up a server can feel like you are learning to crawl again, but once you get it up, Expresso will help you fly to the next level.

Servlet engine up and running

You will need to get your server set up with a servlet engine, preferably one running a servlet API 2.3 engine. Any of the following should work well, although there are many others:

Ideally, look for a server that supports "web applications", as this is the easiest and best way to install Expresso or Expresso-based applications.

.jsp files

Your server should be fully operational with jsp files.

Servlet Aliasing

This is the mechanism by which a server "maps" a URL request to a specific servlet or JSP page.

Every servlet engine setup has a different mechanism for adminstration of servlet aliasing, but whatever the mechanism is, you need to know this mechanism, and have the administration firmly in place and working.

Host/Dev Box Differences

If your primary installation is on a host, and your development work is on another box, you may be faced with additional challenges, not the least of which is different versions of the jdk, compiler, and servlet engines. This requires not only setting up each of the boxes properly, but also the following noteable challenges.

  1. If you are using your devbox to compile java files for your hostbox, and you have a higher version of the jdk on your devbox, install the lower version on your devbox and use it to compile with, otherwise you may find subtle incomptatibilities between JDK versions.
  2. If you are compiling on your developement box, and your servlet engine handles classpath issues for you on the host side, don't think that you are out of the woods yet. Expresso DBTool setup (not running) requires a java classpath to be set up on the server side, or you will be using the -classpath flag  as part of this command, including referencing all those .jar files, and the servlet engine itself.

Testing

Do not proceed to Expresso installation without testing each of the above. If they work, the tests won't take any time, but if they don't work, you definitely want to isolate and fix any problems before you move on to Expresso.

SMTP Server

It is recommended that you have a SMTP server working and tested before you can successfully install Expresso. If you do not have access to an SMTP server, you will lose some of Expresso's functionality such as remote error reporting, email validation, user setup, and other features. It is definitely not recommended that you skimp on a SMTP server for deployment. If you need a quick and easy SMTP server for your own desktop, we recommend the free JAMES java-based mail server. You can find it at:

http://jakarta.apache.org/james

Database Setup

This section may be unnecessary, skip this step if you are using the Expresso compete bundle which ships with the Hypersonic DB. You can latter change the database to connect to once Expresso is installed. Most of us are already stuck with an existing db that we need to lace into the project though, so with this in mind . . .

Installation

Before you try testing your drivers, make sure you have the db installed, and test tables written, inserts and selects made, etc. This is also a good time to make sure you have all your admin interfaces set up, if applicable.

jdbcDriver

Again, if your db isn't already tested, you probably don't want to do your first tests with the jdbc driver. But once it is up, you need to install your jdbc driver, and make sure it is working properly.

DBTool is a good way to do this - see it's documentation for details.

Servlet Testing

Seems redundant, but now would be a good time to test a very simple select statement that tests your db, jdbc driver, and servlet engine all in the same swoop.
The "Test" servlet included with Expresso is a good one to use to check this basic capability.

Host/Dev Box Differences

Once again, if you are developing and hosting on different setups, you must test each completely separately. Catch the problems now, while they are easy to deal with.

External .jar Files Setup

Expresso uses several .jar files that you will have to download from sun or other sources, and install on your box(s). Once again, these are some pretty cool tools that you would eventually want to incorporate even if you weren't doing the Expresso thing, but to install Expresso, you have to have them in place and properly classpathed. (Note: Many application servers include some or all of these requirements).

Classpath

For many servlet engines, just placing the .war files in the proper folder takes care of any classpath problems, but don't forget that you may also be calling the files from outside the servlet engine, so you will either have to set up your classpath for each file or use a -classpath flag for each call.

Host/Dev Box Differences

Make sure you account for any differences between your dev and host box, if you are running two separate boxes.

Java/HTML Setup>

Java Support and Setup

If you haven't installed Java, go to the Sun site (http://java.sun.com/j2se/1.4/) and download JavaTM 2 Platform, Standard Edition version 1.4.1 for SolarisTM, Windows and Linux operating environments. Installation instructions are available online. Also see information on the Java system requirements of Expresso.

General Java Skill Inventory

Where are your Java skill level? Can a novice skill level execute an Expresso implementation? Yes, if one can get through the pre-reqs, you may find that Expresso itself is pretty straightforward. You will also find that Expresso is an excellent place to get the practical experience you need to move your skills up to the next notch, while still knocking out a deliverable product for yourself or your customers.

There are a few considerations that you may wish to make, however.

Collection Interface Skills

The collection interface (in java.util) is the core of Expresso's functionality, as dbobject files abstract records into collection objects. This is a BIG adjustment for the first hour or so, if you are a jdbc or odbc or ado coder.  You may be swearing that first hour, even if , by the end of the day, you wonder how you ever did it any other way.
The two critical issues for the pre-req's are:

  1. Boning up on your handling of Vectors, Hashtables, Enumerations etc, before you start.
  2. Mentally preparing yourself for the "adjustment".

.css Files

Many of us have written HTML for years without ever touching a .css file. Not to worry, it takes about an hour to learn, if that. But you will have to get a handle on this before you get very far into your implementation, because Expresso uses this tech from the very first .jsp page. Additionally, you need to be advised that not all browsers support .css equally. Most notably, some of the tables that look perfect in ie will not appear properly in Netscape 4.x.

Next Steps: Getting Started with Expresso Setup

For more information on getting Started with Expresso please refer to the Getting Started Users Guide.

Directory Structure and Architecture

You would be well advised to take a few hours to go through the directory structure of both the com.jcorporate.xxxx.java files, but also through the expresso .jsp files, to get a handle on how things are built before you start.

When I did this at first, I felt pretty overwhelmed, and was ready to chunk the whole thing as being too complex. But then I look at some of the simpler projects I have built, and see the same complexity. And then there is java itself: At first I thought java was "just too hard," but then I grew to understand that it is not that it is too hard, but "it just does so much." The same seems to apply to Expresso.

Below are some references for getting started with the directory structure:

Example Application

When you are ready to give it up as too hopeless to even begin to understand, download the example application, and you will see how simple it can be. This can be especially encouraging after you have Expresso up and can see the example application in action. Very straightforward.

Below are some references for getting started with sample examples:

Conclusion

Time budget

If you have all the pre-req's done (including the testing), you will find that the time you need for the implementation itself is pretty small. Maybe less than a day to get it up, and another day or so to get the initial customization pointing to your own verbiage and images.

For this investment of a day, you will be shocked to see what you get, especially if you compare it to writing your own infrastructure, or even worse, writing your site in pure servlets, without a supporting infrastructure. In all newbies find it takes about 2 weeks to get fully up to speed.

Contributors

Contributors to this document include: Pete Carapetyan, Sandra Cann

If you find any trouble spots with this document, or something you'd like to see clarified please contact the maintainer of this document.


Copyright � 2002-2004 Jcorporate Ltd. All rights reserved. Copyright Privacy

Last Modified: 09-May-2004