This tutorial will give you two simple examples on how to host web-applications in CompleteFTP.
Before getting started, you need to enable the 'Server-side Javascript (JSS)' property, on the site which is serving up the page.
From the side-bar menu, select the 'Settings' panel (Professional Edition)
OR select the 'Sites' panel (Enterprise Edition).
Enable JSS for the site by checking the 'JSS enabled' checkbox in the Site Settings HTTP/HTTPS category.
Enable JSS for the user who is the owner of the folder, into which the JSS file will be placed, as follows:
Select the 'Users' panel from the side-bar menu.
Select the user whose home folder will contain the jss file, e.g. 'JoeSmith'.
Note that the owner of the /Public folder is the user called 'anonymous', which is hidden by default.
To show it, check the 'Show system users/folder/sites' item in the View menu at the bottom left.
In the 'User Properties' window, check the 'JSS(Server-side Javascript)' checkbox.
Click the 'Apply changes' button at the top right of the CompleteFTP Manager.
Now, let's create our own web-application in Javascript.
Example 1
In this example, we create a web-app that simply displays 'Hello world' and is available publicly.
Create a text file called helloworld.jss with the following content.
response.write("Hello world");
Save it in C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Public.
Since 'anonymous' is the owner of /Public, JSS must be enabled for that user, as described above.
In this example, we're going to create a .jss file in a user's home directory, and execute it as a JSS
web application. This web-app will be available only to the user.
Create a file called listFiles.jss with the following content: