ExperSHOP - Quick Start instructions


Home Contents

Please email any bug reports, comments or suggestions to ExperLog's Online Support


Prerequisite

  • A java environment that supports java servlets (JDK 1.2+).
  • A web server that supports servlets, like Tomcat, Enhydra, or any commercial one like Weblogic or Websphere.
The sample shop comes with a demo database, there's an InstantDB engine coming with ExperSHOP for demo purposes.

Installation as a web application

This chapter applies to servlet engines that support Web Applications Archive deployment (.war files).
Any server that supports at least the Servlets 2.2 specification (like, for example, Tomcat) should support .war deployment.
If your servlet engine DOES NOT support .war files, please skip to the next chapter.

To deploy ExperSHOP as a Web Application:

  • Download the expershop.war file on ExperLog's web site ("ExperShop Web Application Package" in the download section).
  • On Windows, this file may appear as "expershop.war.zip": if so, rename it "expershop.war".
  • Deploy the ExperShop Web Application, as specified in your servlet engine documentation about .war files deployment. (For example, on Tomcat, copy the expershop.war file in the "webapps" directory; other servlet engines may require that you use administration tools, or update configuration files - if so, refer to the relevant documentation).
  • Restart your servlet engine.
More detailed instructions can be found here, concerning specific installation on Tomcat 3.3 or 4.x or Enhydra 5.

To check if everything works, contact the expershop sample application with your web browser.

The URL looks like:
http://host[:port]/expershop
or (direct access to the servlet):
http://host[:port]/expershop/com.expershop.lite.ExperSHOP
For example, with a default installation of Tomcat on the local host:
http://localhost:8080/expershop
A welcome page should be displayed.

If it works now, you can leave this page !

Congratulations, the installation process is over.
If not, reading the next chapters may help...

Legacy installation (no web application archive support)

This chapter applies to legacy servlet engines, that do not support web application archive deployment.
It is also applicable to a servlet engine that supports .war files, but the process is more complex than simply deploying the .war file...

First, we suppose you have downloaded ExperSHOP.
If you don't have ExperSHOP, get it on ExperLog's Web Site. Then:

  • Install the jar or zip file somewhere in your directory tree.
    Advice: On Windows, copy it directly into C:\; On Unix, copy it into /usr/local. (in both cases, an "ExperSHOP" sub-directory will be created).
  • Extract the files: jar xvf ESLite.jar, or unzip ESLite.zip (on Windows, WinZip can be used for the zip file).
  • On Windows: Make your CLASSPATH point to the C:\ExperSHOP\lib\expershop.jar file, as well as to the C:\ExperSHOP\InstantDB\idb.jar file. Example:
    set CLASSPATH=%CLASSPATH%;C:\ExperSHOP\lib\expershop.jar;C:\ExperSHOP\InstantDB\idb.jar
  • On Unix: Make your CLASSPATH point to the ExperSHOP/lib/expershop.jar file, and to the ExperSHOP/InstantDB/idb.jar file.
    Example in ksh syntax:
    export CLASSPATH=$CLASSPATH:/usr/local/ExperSHOP/lib/expershop.jar:/usr/local/ExperSHOP/InstantDB/idb.jar
UNIX setup script

The ExperSHOP directory contains a shell script (essetup.sh) that can make the install easier (mainly concerning InstantDB file permissions...).
To use it, simply go into the ExperSHOP directory, and execute it (for example as follows, or change its access rights and run it directly):

 source essetup.sh

DynHtml pages

They are in the ExperSHOP/shops/lite/ESRootDir/ESTemplates/Shop directory: have a look at them, along with the DynHtml tutorial.

Running the sample shop

Running the sample shop with Enhydra

Enhydra is an open-source application server, developed and maintained by Lutris technologies.
You can download Enhydra from enhydra.org.

Then, after you installed Enhydra on your server, check our Enhydra configuration for ExperShop release notes:

Running the sample shop with Tomcat

Tomcat is the reference implementation for java servlets, provided by Apache. It is intended to replace Apache JServ.

You can download Tomcat from Apache jakarta project pages.

Then, after you installed Tomcat on your server, check our Tomcat configuration for ExperShop release notes:

Running the sample shop with BEA Weblogic

Weblogic is the servlet and HTTP server provided by BEA systems.

You can evaluate and purchase Weblogic from BEA's web site.

Then, after you installed Weblogic on your server, check our Weblogic configuration for ExperShop release notes:

Running the sample shop with Apache JServ

You need the JServ Apache module, to run servlets (see the java apache project for more info).

We'll suppose Apache and JServ are properly configured. Then:

  • Declare a JServ zone for the ExperSHOP sample shop, along with its configuration file (see the apache documentation for more details).
  • In the zone's configuration file, update the "repositories" property so it points to the shop's classes, just like a CLASSPATH. Example:
    repositories:yourpath/ExperSHOP/lib/expershop.jar:yourpath/ExperSHOP/InstantDB/idb.jar
  • In the same file, declare a SHOPDIR and a SHOPCONFIG parameter to be passed to the ExperSHOP servlets (SHOPDIR is the name of the directory that contains the ExperSHOP configuration file, SHOPCONFIG is the ExperSHOP configuration file name).
    You may specify SHOPCONFIG only, with the whole path inside.
    Example:
    servlets.default.initArgs=SHOPCONFIG=
    yourpath/ExperSHOP/shops/lite/EShop.cfg
  • Update the corresponding EShop.cfg and DemoShop.cfg files (on Windows, EShopWin.cfg and DemoShopWin.cfg), specifying full absolute paths for all files pointed there (example: ExperSHOP.RootDir must contain an absolute path).
  • In your web browser, call http://your-server-name/name-of-the-JServ-zone/com.expershop.lite.ExperSHOP

Running the sample shop with a Netscape server

Using the Netscape native servlet interface is not recommended: if you are using a Netscape server, better use JRun for servlets.

  • Enable server-side java in your Netscape server (using the Netscape admin tool).
  • Download JRun evaluation version (free); commercial users will have to purchase the product.
  • Install JRun (comes with detailed installation instructions).
  • Don't forget to set the CLASSPATH value in the JRun administration tool (JRun does not use the CLASSPATH environment variable defined on your system, it has its own settings).

(Legacy) Running the sample shop with servletrunner

An easy way of testing the sample shop is to run it using servletrunner (the servlet test tool that comes with java servlets).

  • Go into the ExperSHOP\shops\lite directory.
  • Run servletrunner -d .
  • In your web browser, call http://your-server-name:8080/servlet/com.expershop.lite.ExperSHOP
Some bugs in some releases of servletrunner.exe can cause ExperSHOP's configuration file not to be found...

Windows Users:

  • If you did not install ExperSHOP directly under C:\ExperSHOP, edit the EShopWin.cfg and DemoShopWin.cfg files and replace the "C:\\Expershop\\..." strings with the value that corresponds to your installation (always duplicate the "\" characters).
  • If you still encounter configuration problems (like "file not found" exceptions or database connection trouble), copy the EShopWin.cfg file into the JSDK root directory (for example, if servletrunner.exe is in C:\JSDK2.0\bin, copy EShopWin.cfg into C:\JSDK2.0).

Unix Users:

  • If you encounter configuration problems (like "file not found" exceptions or database connection trouble), copy the EShop.cfg and DemoShop.cfg files into the JSDK root directory (for example, if servletrunner is in /usr/local/JSDK2.0/bin, copy EShop.cfg and DemoShop.cfg into /usr/local/JSDK2.0).
  • Edit EShop.cfg and DemoShop.cfg, and replace relative paths with absolute ones (see the comments in the files).

Note For InstantDB Users:

You may encounter problems with the shopping cart, due to database initializing problems on some platforms: if the cart does not work properly, run java org.enhydra.instantdb.ScriptTool in the ExperSHOP/shops/lite directory.

(Legacy) Running the sample shop with Java Web Server

First, copy the configuration files in Java Web Server's root directory.

The configuration files are in the ExperSHOP\shops\lite directory (EShop.cfg, DemoShop.cfg, EShopWin.cfg, DemoShopWin.cfg).

Then:

  • Start Java Web Server.
  • In your web browser, call http://your-server-name:8080/servlet/com.expershop.lite.ExperSHOP

Troubleshooting

The demo shop has "all" traces enabled - which corresponds to a high level of verbosity, not recommended in production environment.
The trace file is /tmp/demoshop.trc (Unix) or c:\ExperSHOP\demoshop.trc (Windows).
Have a look there: if an exception occured, it should be traced at the end of the file.