User Dictionaries (Add Option)

To activate the 'Add' option specify the userDictionaryFile attribute to a valid text file path on the server.

The userDictionaryFile property can be set either to an absolute file path (eg. c:\somedir\userdict.txt) or to a URL relative to the application root (eg. ~/dictionaries/userdict.txt which points to a folder named dictionaries under the application's top folder).

Code Example

<RapidSpellWeb:rapidSpellWInline

id="rswi"

textComponentID="..."

userDictionaryFile="~/dictionaries/dictionary.txt"

/>

Setting The Storage Directory Path

As a security measure, RapidSpell locks down user dictionary storage to locations specified in the application's web.xml file, and only allows files of type .txt to be used as user dictionaries.

1. Set a paramter called RapidSpellUserDictionaryDirs in web.xml to a comma delimited list of directories where you intend to store user dictionary files.

eg.

<?xml version="1.0" encoding="UTF-8"?>

<web-app ...>

    <context-param>
        <param-name>RapidSpellUserDictionaryDirs</param-name>
        <param-value>~/dictionaries/</param-value>
    </context-param>

....
</web-app>

This will mean that userDictionaryFile in the tags must be set to a file under ~/dictionaries/.
It may be necessary to restart the app. server after changing the web.xml, for it to have effect.

2. User dictionaries must now be .txt files, so with the above setting a valid userDictionaryFile value is "~/dictionaries/somename.txt"