|
Newsletters
|
|
|
|
|
Serving Up WAP with Enhydra
Enhydra Mini-HOWTO
Download List:
On Windows:
- Java 2 SDK - from Sun
- Cygwin Tools - from Cygnus
- Enhydra 3.0.1 - from the Enhydra site
On Linux:
- Java 2 SDK - from Sun
- Enhydra 3.0.1 - from the Enhydra site
Download the appropriate files for your operating system and install the Java
SDK first. All this should involve is unzipping or untarring the SDK file and
setting the appropriate PATH environment variable. See the Java 2 SDK documentation
for more information.
If you're in Windows, unzip the Cygwin tools to your C:\ directory. This will
create all the folders Cygwin needs, like C:\usr, C:\bin, C:\usr\local\bin, and
so on. If you're in Linux, you're already good to go.
Un(zip/tar) Enhydra. On Windows, just unzip Enhydra to your C:\ directory. If
you've got Cygwin installed correctly, Enhydra will put itself in the directory
C:\usr\local\enhydra3.0.1. In Linux, you have to move the untarred files to
/usr/local, or wherever you want, but /usr/local/ is a good place. You also may
want to make a symbolic link 'enhydra' that points to 'enhyrda3.0.1' to allow for
easier future upgrades.
Windows users: All commands from now on should be made through the Enhydra Bash
shell, whose shortcut can be found in C:\enhydra\EnhydraShell_[95_98 or NT].
Configure Enhydra by going to the enhydra3.0.1 directory and telling Enhydra where
your Java 2 SDK is by typing:
Windows:
./configure //C/jdk1.2.2
Linux:
./configure /usr/local/jdk1.2.2
Now it's time to test your installation. Type:
/usr/local/enhydra3.0.1/bin/newapp HelloWAP
This will create a directory called HelloWAP, which has all the basic framework
of files for a typical Enhydra application. CD into the HelloWAP directory,
and you'll see another directory called HelloWAP, and a couple config and make files.
We'll get to these in a minute. For now, just type:
make
If everything is set up right, you'll watch your new HelloWAP application being
built. After it's done, there should now be a output directory which has your new
HelloWap.jar file in a lib directory, and a classes directory which has the structure
for all the necessary classes for your new HelloWAP package. If make completed
without errors, cd into the output directory, and type:
./start
This will start up Enhydra's built-in multiserver. You should see:
Multiserver,INFO: HTTP listening on port: 9000
Point your favorite browser to http://localhost:9000 and after a minute or so
(the first time an Enhydra application is called, it takes a while for it to
come up, but then it's fast) you should see the little Enhydra otter mascot
laying back enjoying a cup of joe under the words "Welcome to HelloWAP!"
Of course, this isn't WAP, it's HTML, but we're running this just to make sure
everything's set up right. We'll turn the application into a WAP application
later. We first need to configure Enhydra for WAP applications.
If you're having problems getting this far, the documentation supplied with
Enhydra and the enhydra.org website should have your answers.
Next: Configuring Enhydra for WAP
|
|
|