findinsite-js installation guide for Apache Tomcat
This page is for information purposes only.
It is not a recommendation to use this Java servlet engine or application server.
Please consult the supplier's documentation for full installation information
and details of how to deploy and configure servlets such as findinsite-js.
findinsite-js is a Java servlet.
It is a program that must be run by a Java servlet engine on a web server,
with its output viewed in a browser.
Please refer to these pages for more information:
Please consult our Getting Started Guide for an overview
of how to obtain findinsite-js, set up your server, install and configure findinsite-js.
Get the findinsite-js software from the Download page.
- Java application servers usually have built-in support for Java servlets.
- Alternatively, a Java servlet engine can be installed and connected up to an
Apache Tomcat is a free servlet engine for use primarily with the Apache server
on many platforms -
available from tomcat.apache.org.
Tomcat 6 supports the servlet specification JSDK 2.5;
Tomcat 5 supports JSDK 2.4.
Tomcat 4 supports JSDK 2.3.
Tomcat includes a servlet web server so it does not need to be connected
to a web server when testing.
Use the Tomcat Manager to deploy the
findinsite-js Web application archive (WAR).
Most configuration of findinsite-js is done in its online configuration screen.
However, if the the work init parameter needs to be changed, then this
needs to be done by editing a configuration text file manually.
findinsite-js Deployment, Configuration and Usage Instructions
Overview of the instructions:
- Install findinsite-js.
- Find the findinsite-js URLs and display the findinsite-js configuration screen.
- Check the work directory location.
If necessary, change the work init parameter
and restart findinsite-js.
- Run test searches of the findinsite-js documentation
and confirm that result pages are shown correctly.
- Index your own site from the findinsite-js configuration screen
Set findinsite-js to use your search database index.
- If desired, set up word highlighting
for searches of your web site.
Installing the findinsite-js web application
findinsitejs.war is usually called
These are the deployment options:
- Web Application Manager user interface
The Tomcat Web Application Manager user interface is usually found at a URL like this:
The Manager lets you control all servlet applications and install new servlets.
In Tomcat 5.5 Manager:
- Go to the section "WAR file to deploy".
- Click on "Browse" to find your downloaded copy of
- Then click on "Deploy".
- findinsite-js should now be installed with context path
- Click on "/findinsitejs" in the manager application list to see the findinsite-js
- Simply copy the findinsite-js Web Application
into the Tomcat
(In some cases, you might have to put
findinsitejs.war in the
Ask your webmaster or ISP for advice.)
- If Tomcat is not running, start it now.
The WAR file is automatically installed
- If Tomcat is running, then it should shortly detect the
new WAR file, and install it into directory
If not, try installing findinsite-js using the Tomcat Web Application Manager.
Or failing that, stop and restart Tomcat.
- findinsite-js should now be installed with context path
The following URLs should now be available
(assuming that Tomcat is running on the default web server port of 80, and the context path is
Check the work directory location
Before you start testing findinsite-js, it is important to check that the
findinsite-js work directory is in a suitable location.
findinsite-js uses a work directory to store all its configuration information
and search database files. It is important that this directory is secure from
unwanted direct access, while still being available to findinsite-js.
It is also a good idea to make sure that this directory is not wiped accidentally,
eg if you update the findinsite-js runtime to a newer version.
Finally, it is also a good idea to backup the contents of the findinsite-js work directory regularly.
findinsite-js makes a directory called
FindData when it starts.
For most Tomcat installations, this is a sub-directory of
Although this location is fine, its contents will be visible to browsers and
might be lost if you update the findinsite-js runtime,
so it might be best to change the work directory.
- If you want to change the work directory, then first create a suitable directory.
In the findinsite-js configuration screen General section, enter this location in the
"Test work directory" field and press the "Make Changes" button.
findinsite-js checks that this directory is usable and reports back to you.
- Assuming your directory location is fine, you then need to set the findinsite-js
work init parameter
to this value. This ensures that findinsite-js uses this directory
even if Tomcat or findinsite-js is restarted.
Changing init parameters
In Tomcat, the only way to change an init parameter is to edit a file
web.xml in the
Find the work init-param and put your directory name in between the
param-value tags (which is empty by default).
For example, to set the work init parameter to
D:\search, use the following (with the changes highlighted):
- Restart findinsite-js in the Tomcat Web Application Manager
(or stop and start Tomcat).
- Check that the findinsite-js configuration screen shows your chosen work directory.
Check that you can search the findinsite-js documentation correctly, as follows:
- Browse to the findinsite-js localised search page, eg
- Enter some search text, eg engine and click on "Search".
- The first 10 hits are displayed. Click on a hit and check that the result page is displayed
correctly in the browser.
If the hit page is not shown correctly, then you probably need to alter the
Additional Base URL setting in the configuration screen Searching section.
Index your own site
Follow the general Getting Started instructions
to index your own site to build a search database and start searching.
Test Word highlighting
See the Word highlighting instructions
for details of how to set this up for HTML pages shown in Internet Explorer 4+.
Additional Tomcat Instructions
findinsite-js's memory usage will depend on the size of your search database.
The Sun JVM defaults its maximum size for the memory allocation pool to 64MB;
this could cause "Out of memory" errors in findinsite-js.
In Windows you can alter this value using the Start menu "Apache Tomcat 5.5"->"Configure Tomcat 5.5".
Click on the Java tab and enter a (higher) value in the "Maximum Memory Pool" field. Then click "Apply" or "OK".
Set the -Xmx parameter in the java command that runs Tomcat,
eg -Xmx256M to set the maximum pool size to 256MB.
Probably the simplest way to set this parameter is to set the following environment variable
(in Windows use Control Panel+System+Advanced+Environment Variables):
I think that this option applies to all ways of running Tomcat.
By default, Tomcat has logging switched on, producing log files in its
directory. Log files are produced for each day, eg named
If findinsite-js logging is enabled in the findinsite-js Configuration screen General section
then it produces log output to the Tomcat log file. Each line of the log file
is prefixed with a date-time stamp etc and "fisJS", eg:
12-Sep-2005 14:40:44 org.apache.catalina.core.ApplicationContext log
INFO: fisJS: FindinSite 6.0, 29 July 2005. init JSDK 2.4
Note that all the output from an indexing run can be displayed in the Configuration screen
Indexing section by clicking on an indexing's Details
This "Last run output" is also included in the (optional) email report.
It is important that findinsite-js is running if you want it to reindex your site regularly.
A scheduled indexing run may be missed if findinsite-js has not been started and run.
If the servlet engine stops and restarts then findinsite-js might not be restarted automatically.
The Tomcat Manager may show findinsite-js as running, but in fact it has not been started.
Any access to the findinsite-js servlet will start findinsite-js.
To ensure that a reindex runs every day, for example,
then use some tool to schedule a regular 'ping' of a findinsite-js URL,
ie access a findinsite-js page eg the findinsite-js localised search page
Remember to take into account any time zone differences.
Note that accessing the findinsite-js welcome page will usually NOT start the servlet, eg:
To uninstall findinsite-js, click on "Undeploy" to the right of "/findinsitejs" in
the Tomcat 5.5 Manager. This deletes all files in the "/webapps/findinsitejs/" directory including the "FindData"
sub-directory and all its files. The WAR file "/webapps/findinsitejs.war" is also deleted.
Alternatively, delete the file "/webapps/findinsitejs.war/" and all directory "/webapps/findinsitejs/" by hand.