FindinSite-JS: Search engine for a Java server website   .
Powered by FindinSite-JS
. Home | Installation | Indexing | Configuration | Advanced | Purchasing .
. .
  Servlet engines | Servlet engine installation | findinsite-js Installation / Apache Tomcat


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.
  • Java application servers usually have built-in support for Java servlets.
  • Alternatively, a Java servlet engine can be installed and connected up to an existing server.
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.
Page contents
Tomcat introduction
Setting up...
Install findinsite-js
findinsite-js URLs
Work directory
Run test searches
Index your own site
Word highlighting
Init parameters
Log files
Startup issues
Uninstalling findinsite-js

Apache Tomcat

Apache Tomcat is a free servlet engine for use primarily with the Apache server on many platforms - available from 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:
  1. Install findinsite-js.
  2. Find the findinsite-js URLs and display the findinsite-js configuration screen.
  3. Check the work directory location.
    If necessary, change the work init parameter and restart findinsite-js.
  4. Run test searches of the findinsite-js documentation and confirm that result pages are shown correctly.
  5. Index your own site from the findinsite-js configuration screen Indexing section.
    Set findinsite-js to use your search database index.
  6. If desired, set up word highlighting for searches of your web site.
Further instructions:

Installing findinsite-js

Installing the findinsite-js web application findinsitejs.war is usually called deployment. These are the deployment options:
  1. Web Application Manager user interface

    The Tomcat Web Application Manager user interface is usually found at a URL like this: http://localhost/manager/html. The Manager lets you control all servlet applications and install new servlets.

    In Tomcat 5.5 Manager:

    1. Go to the section "WAR file to deploy".
    2. Click on "Browse" to find your downloaded copy of findinsitejs.war.
    3. Then click on "Deploy".
    4. findinsite-js should now be installed with context path /findinsitejs.
    5. Click on "/findinsitejs" in the manager application list to see the findinsite-js welcome page.

  2. Automatic

    1. Simply copy the findinsite-js Web Application findinsitejs.war into the Tomcat webapps sub-directory.
      (In some cases, you might have to put findinsitejs.war in the webapps/your-domain/ sub-directory. Ask your webmaster or ISP for advice.)

    2. If Tomcat is not running, start it now. The WAR file is automatically installed into directory webapps/findinsitejs.

    3. If Tomcat is running, then it should shortly detect the new WAR file, and install it into directory webapps/findinsitejs. If not, try installing findinsite-js using the Tomcat Web Application Manager. Or failing that, stop and restart Tomcat.

    4. findinsite-js should now be installed with context path /findinsitejs.

findinsite-js URLs

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 /findinsitejs):
findinsite-js welcome page http://localhost/findinsitejs/
findinsite-js documentation http://localhost/findinsitejs/doc/
findinsite-js search page http://localhost/findinsitejs/search
findinsite-js configuration screen http://localhost/findinsitejs/search?config=now

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 webapps/findinsitejs, ie webapps/findinsitejs/FindData/. 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.
  1. 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.

  2. 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 called web.xml in the webapps/findinsitejs/WEB-INF directory. 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):


  3. Restart findinsite-js in the Tomcat Web Application Manager (or stop and start Tomcat).

  4. Check that the findinsite-js configuration screen shows your chosen work directory.

Test Search

Check that you can search the findinsite-js documentation correctly, as follows:
  1. Browse to the findinsite-js localised search page, eg http://localhost/findinsitejs/search.

  2. Enter some search text, eg engine and click on "Search".

  3. 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".

Alternative technique:

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.

Log files

By default, Tomcat has logging switched on, producing log files in its logs directory. Log files are produced for each day, eg named localhost_log.2006-09-12.log.

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 i icon. This "Last run output" is also included in the (optional) email report.

Startup issues

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 http://localhost/findinsitejs/search.
Remember to take into account any time zone differences.

Note that accessing the findinsite-js welcome page will usually NOT start the servlet, eg: http://localhost/findinsitejs/.

Uninstalling findinsite-js

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.

  All site Copyright © 1996-2011 PHD Computer Consultants Ltd, PHDCC   Privacy  

Last modified: 22 November 2007.

Valid HTML 4.01 Transitional Valid CSS!