The Salmon Open Framework For Internet Applications (SOFIA) : Version 2.3 Manual Installation Guide
The Salmon Open Framework For Internet Applications (SOFIA) : Version 2.3 Manual Installation Guide
Salmon LLC
220 Old Country Road
Mineola, NY 11501-4271
(516) 742-7888
Version 2.3
SOFIA 2.3 Manual Installation Guide
Copyright Notice
The Salmon Open Framework for Internet Applications (SOFIA) has been released under
dual licensing schemes. Unregistered versions of SOFIA fall under the GNU General
Public License. This in effect means that non-internal projects that you create with SOFIA
will also have to be released under the GNU GPL as open source. Once you register for
SOFIA, you will be able to use it under the Salmon license as well. The Salmon license
allows you to distribute SOFIA binaries with your SOFIA application without having to
make your software open source. Registration is free. To register your copy of SOFIA,
please visit http://www.salmonllc.com/register.
This program is free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License version 2 as published by the Free Software
Foundation; Registered versions can be distributed under the terms of the Salmon
Software License version 1 as well;
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
To get a copy of the GNU GPL, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
To view the full GNU GPL and Salmon Software License on-line please visit
http://www.salmonllc.com/license.
The Salmon Open Framework for Internet Application (SOFIA) integrates best of breed
products from several different sources. This install procedure has been tested for
development with:
• JDK 1.4
• Tomcat 4.1.24/Tomcat 5.0.27
• MySQL 3.23 and 4.0
• Eclipse version 21 or 3.0.
• Dreamweaver MX 6 or Dreamweaver MX 7 (2004).
We recommend at least 256mb of memory to be able to run all these different tools
simultaneously, but 512mb will provide a better experience. In addition, you will need at
least 80 mb of free disk space.
SOFIA applications can be deployed on any J2EE compliant servlet/JSP engine. SOFIA
applications have been successfully deployed on various versions of Tomcat, Bea
Weblogic, IBM Websphere, Caucho Resin, Orion and SilverStream in MS-Windows,
Linux, Solaris and VMS environments. SOFIA applications can be also be deployed
with most of the popular commercial and open source database engines including
MySQL, Sybase, Oracle, MS SQL Server, DB2, Ingres, Postgres and Firebird.
These instructions will step you through the process of manually installing a binary
version of SOFIA and the SOFIA example application using Tomcat 4.1 or 5.0 and
MySQL Version 3 or 4.
In addition if you want to manually install SOFIA for development, instructions are
provided for Eclipse 2.1 and 3.0 and Dreamweaver MX or MX 2004.
This document will reference several directories that you will create:
Note: The SOFIA directory with source code and resources should be installed
locally on the machine you will use for SOFIA development or on a drive that is
always accessible to that machine.
If you have used the SOFIA Manual Install procedure for SOFIA 2.2, please note
that SOFIA 2.3 now supports property files in the /WEB-INF/properties folder of
each individual web application or a shared property file location. SOFIA 2.2 only
supported the shared location. Because installation is easier with the property
files in the WEB application, this distribution now uses that method. So if you are
installing this package over a previous manual install, you should make the
following changes to your Tomcat configuration, before doing this install:
These steps assume that you have already unpacked the SOFIA distribution to your
local file system and now have the following directory structure.
Install the Java Development Kit version 1.4.1. This can be downloaded from
Sun’s web site at http://java.sun.com/j2se/1.4/download.html . Make sure to
download the full SDK (System Development Kit) and not just the JRE (Java
Runtime Environment). Run the downloaded exe and follow instructions on
screen. If you already have JDK 1.4.x installed on your system you may skip this
step.
Install the MySQL database engine version 3.23 or 4.0. MySQL can be
downloaded from http://www.mysql.com/downloads/index.html. If you already
have MySQL 3.23 or 4.0 on your system you can skip this step. Note:
instructions later in this document will refer to setting up the SOFIA example
database in a MySQL installation, although SOFIA can be used with almost all of
the major database engines. You may be able to substitute some of the steps
described below with analogous ones for the engine you are using.
The database installation script below uses ANSI SQL DDL to create the tables
and data for the SOFIA examples database. You may be able to use it in engines
other then MySQL either unchanged or with minor changes.
Before you can complete this process you must first manually install SOFIA and the
SOFIA example application as outlined on the previous pages.
Note: SOFIA Uses Dreamweaver as a GUI development environment for editing JSP
pages. You can also use a regular text editor to edit your JSP files. If you would rather
not use Dreamweaver or Dreamweaver is not available on your platform you can skip this
part of the install.
Run the Macromedia Extension Manager. Click on “Install New Extension” and
install the extension:
/SOFIA/Resources/Dreamweaver/Mxp/SofiaExtensionsMX.mxp
Follow the instructions on screen and answer Yes if the extension manager asks
you if you want to replace any files. Make sure to close Dreamweaver and the
extension manager before going on to the next step.
Before you can complete this process you must first manually install SOFIA and the
SOFIA example application as outlined on the previous pages. Also if you are using
Dreamweaver, the Dreamweaver install should be completed prior to this step.
Step 2: Put the SOFIA DLLS on your System path (MS-Windows Only)
SOFIA comes with two DLLs that are used only for MS-Windows installations.
These are located in the directory /SOFIA/Resources/DLLS. Both these DLLs
are optional. One is SDCLIENT.DLL which allows SOFIA to interface with a
SecureID server (a service which provides electronic key chains that produce
passwords that are only valid for a short time). The SOFIA secure id package
works through JNI calls to this DLL and so only works on MS-Windows
environments. The other is REGUPDATE.DLL, which is used to access the MS-
Windows registry when a new SOFIA project is created in an IDE. The SOFIA
plug-in uses this DLL to create new registry entries to set up a site definition in
Dreamweaver that corresponds to the new SOFIA Java project in the IDE.
Without this DLL installed you will have to manually create the Dreamweaver site
definition whenever you create a new SOFIA project.
On MS-Window, copy the DLLs to a directory in your system path like the
C:\WinNT\System32 directory. Otherwise you can skip this step.
If Tomcat is running, shut it down. You will launch it later from within the IDE.
If you already set up the paths for your browsers and Dreamweaver in step 5 you
can skip this step. Otherwise, on the Eclipse menu bar click SOFIA->Set
Properties. At the bottom of the dialog are edit fields where you can specify the
paths to Dreamweaver and to various browsers.
From the Eclipse toolbar, run the SOFIA Example application by clicking the
down arrow next to the “Run default page in browser” tool bar button and
choosing the browser to run the page in.
Verify that the Site for SOFIAExamplesEclipse was set up properly. You can see
this by clicking on Site->Edit Sites or Site->Manage Site on the Dreamweaver
menu. If you see a site list with sofiaExamplesEclipse, then the site was created
properly and you are ready to go. Otherwise create a new site with the following
properties:
Use the basic tab of the site definition wizard: When prompted, specify the
following:
Name: sofiaExamplesEclipse
Use a server Technology: Yes
Server Technology: JSP
Editing Files: Edit and Test Locally
File Location: /ECLIPSEDIR/workspace/sofiaExamplesEclipse
Root URL: http://localhost:8080/sofiaExamplesEclipse/
Once you’ve created the site, click on the menu Commands->Salmon Set
Properties and specify the following properties for the site.
Prefix: salmon:
Application: sofiaExamplesEclipse
Tag Lib: taglib.tld
Servlet URL: http://localhost:8080/sofiaExamplesEclipse
Translator Mode: On
Default Language: en
Note: If using Dreamweaver with Cross Over Office on Linux, using the IP
address of the local workstation instead of localhost may result in better
performance.
Once your site is properly set up, you can verify that everything is working
properly by open the SOFIAExamples home page (/JSP/HomePage.jsp). You
should see a rendering of the page in the design area. Clicking on the globe to
run it should pop up a browser window with the page.
If you wish to use JDK 1.3 instead of JDK 1.4, you may do so by following the steps
below. Note: The SOFIA Swing components and IDE Tools require JDK 1.4. JDK 1.3
can only be used for server deployed applications.
1) Make sure you have both JDK 1.3 and 1.4 configured in Eclipse, with 1.3 as the
default. JDK 1.3 will be used for running Tomcat and your application and JDK 1.4 will
be used for the SOFIA IDE Tools, which use SOFIA Swing components and require
1.4. In the Eclipse workspace, select Window->Preferences->Java->Installed JRE’s.
Make sure you have a JDK 1.3.x and 1.4.x in the list with 1.3 selected as the default.
2) Once you do this, some of the Salmon Open Framework project won’t compile. Right
click on the Salmon Open Framework project->Java Build Path->Libraries and add the
following external jars to the build path (Jars can be found in /Tomcat 4.1/common/lib)
crimson.jar
xalan.jar
jdbc2_0stdext.jar
Once you have set the build path, most of the framework will now compile properly.
Some of the classes in the com.salmonllc.util.swing package won’t compile property,
but you should still leave those classes as is in the workspace.
4) Change the SOFIA runtime class path to include the tools.jar from the new JDK.
From the Eclipse Workbench select SOFIA->Set Properties and change the tools.jar in
the server class path to /JDKDIR/lib/tools.jar.