Wintertree Spelling Server |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Support > Wintertree Spelling Server > Problems with Spelling Applet
This document contains solutions to and information about various problems that may be encountered when using Spelling Applet.
Contents:
While using Spelling Applet, an alert containing the message "An error occurred while checking spelling" is displayed on the client.
Symptom 1
Wintertree Spelling Server versions 1.4 - 1.6 is being used. The message "An error occurred while checking spelling" appears when using one of the Spelling Applet examples. The Java console contains the following lines:
E::::
Reading response from server (2) (...):
java.lang.NullPointerException
Cause: A bug in the examples\applet\default.asp script.
Solution: Open c:\Program Files\Wintertree Spelling Server\examples\applet\default.asp using NotePad or a similar editor. Locate the following lines near the bottom of the script:
' We've checked all the words in the text.
Response.Write("E::::" & vbCrLf)
Insert the statements shown below so the lines look like the following:
' We've checked all the words in the text.
If (Not sentinelReturned) Then
Response.Write("$$start$$" & vbCrLf)
sentinelReturned = True
End If
Response.Write("E::::" & vbCrLf)
Symptom 2
Wintertree Spelling Server version 1.6 and later is being used. The message "An error occurred while checking spelling" appears when using one of the .NET Spelling Applet examples (VBExample5 or CSExample5) when the text being spell-checked contains HTML markups. The Java console contains the following lines:
Reading response from server (1) (http://.../AppletServer.asxp):
java.io.IOException
Cause: Newer versions of .NET consider HTML markups in submitted text to be a security threat. The problem will occur when text containing HTML markups is submitted to any .NET application, and results an error page containing the following text:
A potentially dangerous Request.Form value was detected from the client.
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Because the forms contents are submitted to the server by SpellingApplet, and the response from the server is received by SpellingApplet, the contents of the error page are not visible.
Solution: Edit AppletServer.aspx in "form" mode, and insert the "validateRequest=false" option in the Page directive (use the HTML view). However, note that doing so will make your server vulnerable to the security threat against which Request Validation is intended to guard.
Windows client: The "Object does not support this property or method" or "xxx is null or not an object" message appearing in Internet Explorer is almost always a configuration or communication problem. If the applet cannot be located on the server, or cannot be downloaded from the server, or the applet's JAR file is corrupted, IE will be unable to run the applet and the message may appear. IE displays this message whenever it has a problem finding, reading, or running an applet. When this message appears, Spelling Applet has not yet run. IE is stating that it is unable to run Spelling Applet. Again, the cause is almost always some kind of configuration or communication problem between IE and the server.
Make sure that SpellingApplet.jar is located in the same virtual directory on the server as the HTML page which references it (though it is possible to place the .jar file in a different directory if the applet's CODEBASE tag is set).
Server-side security configuration may also result in this problem. Under some circumstances, the server may require a login (user id and password) when Spelling Applet attempts to communicate with AppletServer running on the server. In response, the browser may display a login dialog, which is sometimes hidden behind the browser window.
IE may continue to display the error message even after the problem is resolved unless the page is completely reloaded. On Windows systems, you can force IE to completely reload a page by pressing Ctrl+Shift+F5.
Macintosh client: When SpellingApplet is opened by Internet Explorer running on the Macintosh, the message "Object does not support this property or method" is displayed and the error line points to an attempt to call one of SpellingApplet's methods. Internet Explorer on the Macintosh does not (currently) support JavaScript to Applet communication. This communication is necessary for operation of SpellingApplet. Unfortunately, until the issue is resolved by Microsoft, SpellingApplet is not usable with Internet Explorer on the Macintosh platform.
Symptom: When the "Check Spelling" button is pressed, Spelling Applet displays the "Spelling check complete" message, but misspelled words contained within the text area(s) were not reported.
Solution: Enable Spelling Applet's Verbose parameter. Re-run the test, then check the browser's Java console for a message similar to the following:
Spelling server error -7
This indicates a problem on the server. Please see Spelling Server Error -7 for help with diagnosing the cause and solving the problem.
Symptom: I changed Spelling Applet's DefaultOptions parameter (through the <PARAM> tag), but the options I want to set don't seem to be working and the browser's Java console shows the options value is 33536, which is the default.
The value specified in the DefaultOptions parameter is used only if no options are set or if the value passed to the Applet's setOptions method is 0. The JavaScript code contained in SpellingAppletScript.js obtains options set by the user (through interaction with setoptions.html) and stored in a browser cookie. If any options have been set this way, the value passed to the setOptions method will not be 0 and therefore the default options (specified in the DefaultOptions parameter) will not be used.
If you want to ensure certain options are enabled, there are a few ways to achieve this:
Modify the code in SpellingAppletScript.js (function onCheckSpelling) to OR the option values you want to enable in the options variable before it is passed to the setOptions method.
Create a different language id in the registry which is identical to 24941 but uses different fixed options. Be sure to set the applet's DefaultLanguage parameter to the new language id.
Modify AppletServer.asp to OR the option values you want to enable in the options variable after it is read from Request.Form.
Spelling Applet supports a parameter named "Verbose" that causes it to write additional diagnostic information to the browser's Java console. The default setting for the "Verbose" parameter is "false," which limits diagnostic messages to serious errors. Setting the "Verbose" parameter to "true" causes Spelling Applet to record additional information, which may aid in diagnosing problems.
To enable the "Verbose" parameter, edit the .html code containing the <APPLET> tag which references Spelling Applet, and add the following <PARAM> tag within the <APPLET> tag:
<PARAM NAME="Verbose" VALUE="true">
The PARAM tag can be placed among any other Spelling Applet PARAM tags, but must appear before the </APPLET> tag.
When you next use Spelling Applet, it should record additional information in the browser's Java console. See "How to view the Java console" for further instructions.
The Java console is used by Spelling Applet to record diagnostic messages while it runs. Like all Java applets, Spelling Applet is (usually) run within a browser, such as Internet Explorer or Netscape. Virtually all browsers provide some means of displaying the Java console, but the method varies from browser to browser. If the instructions contained within this topic do not work with your browser, contact the people who support your browser for help.
Internet Explorer
On Internet Explorer versions that use the Microsoft JVM (Java Virtual Machine), the Java Console is accessible under the View menu. If the View menu does not contain a Java Console item, you may need to enable it first (note that the procedure below may vary slightly in different versions of IE; consult your browser's documentation for a procedure specific to your version):
Select Tools + Internet Options
Select the Advanced tab
Locate "Microsoft JM"
Select "Java Console Enabled (requires restart)"
Close all running copies of Internet Explorer, then open Internet Explorer.
On Internet Explorer versions that use the Sun 1.4 JVM, the Java Console is accessible under the Tools menu: "Sun Java console."
Netscape Navigator
On some versions of Netscape Navigator (particularly older versions), to open the Java console select Windows + Java Console.
On newer versions of Netscape Navigator, select Tools + Web Development + Java Console.
Copyright © 2015 Wintertree Software Inc.