Spy-Server Initialisation Parameters

Last modified: 27 December 2003.
  • Home
  • Installation
  • Indexing
  • Configuration
  • Purchasing

  • Introduction

    Initialisation parameters are usually called init parameters in servlet documentation.

    Init parameters give initialisation information to Spy-Server, such as the name of the current search database.  However, Spy-Server usually stores its configuration information in the work directory.  The work directory information overrides the init parameters.

    There is only one vital init parameter - work - and this may be set correctly by default. However, see below to check it.

    In some situations it can be a hassle changing init parameters.  This is why Spy-Server uses its work directory - so configuration changes can be made without changing the init parameters.  However, if you want to be ultra safe, you should make sure that the init parameters have valid values - this guards against the work directory being inaccessible for some reason.

    For server-specific instructions on changing init parameters, see here:


    Work directory

    There is only one vital init parameter - work that sets the work directory. All the others are fallback options in case the work directory is not usable.

    Before you start testing Spy-Server, it is important to check that the Spy-Server work directory is in a suitable location.

    Spy-Server 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 Spy-Server. It is also a good idea to make sure that this directory is not wiped accidentally, eg if you update the Spy-Server runtime to a newer version. Finally, it is also a good idea to backup the contents of the Spy-Server work directory regularly.
    Once the work directory is set up, all configuration changes will be stored so that Spy-Server will remember them even if it (or the Java servlet engine) is stopped and restarted.

    The configuration screen General section displays the current work directory. If this is not suitable then you need to change the work init parameter.

    If the current work directory is not suitable then you must make a suitable (new) work directory and change the work init parameter. The Test work directory field of the General section lets you prove that your new directory is usable by Spy-Server. (Some directories may not be readable or writeable by Spy-Server.)


    Changing init parameters

    If you alter the init parameters, you will need to restart Spy-Server.  You typically do this by restarting the Java servlet engine or even your server.
    In many situations, you will have to ask your webmaster or ISP to change the init parameters and restart the servlet engine.

    How you change init parameters is usually servlet engine specific.  Be careful to use lower case for all the parameter names.

    Most servlet engines provide a control panel interface that lets you change an init parameter. However in almost all cases, there is a fallback manual method of changing servlet parameters. The crucial task is finding a file called web.xml in the Spy-Server deployment directory, usually in the WEB-INF sub-directory.  This file is in XML format.  It should be fairly obvious where to edit this file to set init parameters, eg to set work:

    <init-param><param-name>work</param-name>
    <param-value>
    D:\SpyData</param-value></init-param>
    Then restart the servlet engine.


    Init Parameter List

    Here is a list of all the init parameters that you can set.
    Note that you must match the letter case of the parameter names exactly.  Similarly, it is best if the parameter values that refer to paths/URLs match the letter case of the path/URL exactly.

    The "Supplied value" is the value for the parameter that is installed when the Spy-Server Web Application is deployed.  The supplied values for the index and baseurl parameters set up Spy-Server to search the documentation web pages that are contained in the Spy-Server Web Application.

    The "Default" is the value that is used if no init parameter is found.

    Parameter
    name
    Description Supplied
    value
    Default
    bot The path/URL of the template file containing the HTML to put at the bottom of Spy-Server results, before the footer.
    See the Look and feel page.
    spybot.htt null a standard bottom
    cacheresults If "true", Spy-Server caches search results in the session state to make it quicker to access the next sheet of results. true true Results are cached
    footer The path/URL of the template file containing the HTML to put at the bottom of all Spy-Server output.
    See the Look and feel page.
    spyfoot.htt null a basic footer
    getwordcounts If "true", Spy-Server gets the count of all search words in each page hit, so that the %WORDCOUNT% Results line variable and WordCount session variable are valid.

    Word counts are automatically retrieved if reorderresults is set to "wordcount".

    false false disabled
    heading The path/URL of the template file containing the HTML to put at the top of all Spy-Server output.
    See the Look and feel page.
    spyhead.htt null a basic heading
    languages A comma separated list of URLs for extra language files. See languages page. null null no extra languages
    licenceid The Spy-CD/Spy-Server licence id null null Not licensed
    line The path/URL of the template file containing the HTML to use for each Spy-Server results line.
    See the Look and feel page.
    spyline.htt <DL>
    <DT>
       <B>%RESULTNO%.
       %TITLE_LINK%</B>
       %FILENAME%
    <DD>
       %ABSTRACT%
    </DL>
    <BR>
     
    password The password that must be used for future Spy-Server configuration requests. null null No password required for search database change requests
    reorderresults Specify one the following:
    off Standard Spy-Server sorting
    filename Sort results on the page filename
    title Sort results on the page title
    abstract Sort results on the page abstract
    priority Sort results on the page Priority
    wordcount Sort results on the count of search words in each page

    Optionally then specify one of the following after a space:
    ascending Sort ascending [default]
    descending Sort descending
    null null By default, Spy-Server sorts the results so that pages that are more likely to be of interest are listed first, that is words in the Meta description, Meta keywords, title and headings in that order.
    rules The path/URL of the Rules file rulesen.txt null No word stemming or synonyms
    target The target window name

    The following target frame names have special meaning:
    _self current frame
    _parent parent frame
    _top top-most frame
    _blank new unnamed top-level window

    _self _self Shows a page in the same window, ie to replace the search results sheet
    top The path/URL of the template file containing the HTML to put at the top of Spy-Server results, after the heading.
    See the Look and feel page.
    spytop.htt null a standard top
    work The path of the work directory null null A default sub-directory SpyData is created


    Spy-Server online
    Find in Site search engines for MS-servers, Java-servers and CDs/DVDsSpy-Server is part of the FindinSite software range - search engines for MS-servers, Java-servers and CDs/DVDs