It is possible to use user dictionaries with RapidSpell Web, on a one user dictionary for all users, or one user dictionary per user or one user dictionary per group basis. The user dictionary file is specified in the userDictionaryFile property of the RapidSpellWebLauncher or RapidSpellWeb (the popup JSP) tag. This property specifies the path to the user dictionary file on the server, the developer has total control over which dictionary file is used for a user. Therefore it is up to the developer to manage a user's session and retrieve the path to a particular user's/group's dictionary file, if required.
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).
<RapidSpellWeb:rapidSpellWebLauncher
id="rswl"
textComponentName="..."
userDictionaryFile="~/dictionaries/dictionary.txt"
/>
<RapidSpellWeb:rapidSpellWeb
userDictionaryFile="~/dictionaries/dictionary.txt"
/>
As a security measure, when the userDictionaryFile is set in RapidSpellWebLauncher (as opposed to RapidSpellWeb in the popup), 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"