You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Define the required options in WEBSPELLCHECKER_CONFIG:

WEBSPELLCHECKER_CONFIG can be added to any location on a web page before or after the wscbundle.js script. However, if you add wscbundle.js asynchronously, this CONFIG must be added before the script.

  • Enable autoSearch functionality using the autoSearch parameter.
  • Specify serviceProtocolserviceHostservicePort and servicePath to access the service.

To configure secure SSL connection between your application and AppServer, follow the steps described on the Enabling SSL Connection with AppServer page.

<script>
	window.WEBSPELLCHECKER_CONFIG = {
		autoSearch: true,
		enableGrammar: true,
        serviceProtocol: 'https',
        serviceHost: 'your_host_name',
        servicePort: '2880',
        servicePath: '/'
   };
</script>

If you are not able to use a custom port (e.g. 2880) to access the service and deployed the Server to use the FastCGI protocol (via the SSRV.CGI component), you need to use the different values to access the service properly. Now the entry point for the service requests will be the SSRV.CGI component.

<script>
	window.WEBSPELLCHECKER_CONFIG = {
		autoSearch: true,
		enableGrammar: true,
        serviceProtocol: 'http(s)',
        serviceHost: 'your_host_name',
        servicePort: '443', // this is the port of your web server or Java application server
        servicePath: ''virtual_directory/script/ssrv.cgi''
   };
</script>

Alternatively, you can create a *.js file (e.g. wscbundle_config.js) with WEBSPELLCHECKER_CONFIG on your end and then load it from the file on your web page as shown below.

This is an example of the wscbundle_config.js file with WEBSPELLCHECKER_CONFIG.

wscbundle_config.js
window.WEBSPELLCHECKER_CONFIG = {
	autoSearch: true,
	...
};

Here is an example of the script that you need to add on your web page with the path to wscbundle_config.js.

<script type="text/javascript" src="[path_to_config]/wscbundle_config.js"></script>

  • No labels