These instructions assume you have obtained and correctly installed all of the required hardware and software. If you run into problems, please re-read-again all of the documenation and re-double-check-again the installation and configuration of the required hardware and software.
The TiniHttpServer build process now uses ant. This results in a very streamlined build process.
As of verion 0.17, TiniHttpServer uses a new method for mapping request URIs to servlets. This behavior allows for very flexible configuration options, but is substantially different than previous versions. Please pay close attention to step 4 below and be sure to read the Servlet Mappings page.
Make sure that you have all of the required items listed in the Using Your Servlets with TiniHttpServer section of the System Requirements page.
Edit the file build.properties
file and
ensure that all the paths, files, etc. accurately reflect
your installations of the various components. Read the
comments in build.properties
for full
information about the various properties you can
configure there.
Be sure to include the names of all your
source files (including your servlets'
source files) in the src.files
property.
If your source files are in/under directories
other than the src
subdirectory, be sure
to add the base directories to the
src.dirs
property.
Note that the pure.onewire.jar
property is ignored for TINI builds. It is only used
for non-TINI builds. See How
to Use TiniHttpServer on Any Java System for
details on using TiniHttpServer on systems other than
TINI.
Open a Command Prompt (shell) window and change to the
TiniHttpServer1.0
directory.
Edit the tini/etc/servlets.props
file to
add mappings for your servlets. This is a critical step.
If you do not create mappings for your servlets, they
will not be accessible. This is a significant change from
previous versions. Please read the Servlet Mappings page for
full details.
After deploying, you can also edit the
/etc/servlets.props
file on TINI directly
using TEd.
If TiniHttpServer is already running on your TINI, it is recommended to kill it before deploying a new copy.
Run ant
(with no
parameters) to build and deploy TiniHttpServer top your
TINI.
You should see BUILD
SUCCESSFUL
near the bottom of the output
after this build finishes. If so, your TINI will now
contain the following files:
/bin/TiniHttpServer
/bin/TiniHttpServer.tini
/docs/favicon.ico
/docs/index.html
/docs/robots.txt
/etc/mime.props
/etc/server.props
/etc/servlets.props
/logs
If you encounter problems, run:
ant -debug -logfile ant.log clean
tini
and then examine ant.log
for possible
causes of the problems.
Using telnet, login to your TINI. You can use JavaKit to login to your TINI, but then you will not see the output when TiniHttpServer is run in the background.
Type: source
/bin/TiniHttpServer
After a short while, you should see the following:
SSC Web Server/1.0 Copyright (C) 1999-2002 Smart Software Consulting OneWireServlet: init
If your servlet is preloaded (see Servlet Mappings), you will also see your servlet's initialization messages, if any.
Point your web browser at your TINI. For example, if
your TINI is named kumquat
, you should go to
the following URL:
http://kumquat/
If you want to serve other documents from your TINI,
FTP them to the /docs
directory (or below
it). The file /docs/foo/bar.html
can be
accessed from a web browser via the following URL:
http://kumquat/foo/bar.html
To access your servlet go to a URL that matches the servlet's mapping. See Servlet Mappings for details.
To start TiniHttpServer every time your TINI reboots,
add the following line to the end of your
/etc/.startup
file:
java /bin/TiniHttpServer.tini
/etc/server.props &
Copyright © 1999-2002 Smart Software Consulting