TeraScript Server 8 Installation Notes
Version 8
We strongly encourage users to test their applications on non-production systems.
Installing and Configuring TeraScript Server 8
Installation:
- Double-click the installer and click through any signing/security errors from the operating system, then complete the installer.
- TeraScript 8 will now be installed and running.
Windows: Use the Services control panel to stop, start, and restart the TeraScript Server 8 service.
Configuring the Jetty Web Server:
TeraScript 8 now has a built-in Jetty web server. Windows: By default, Jetty will serve files found in C:\inetpub\wwwroot at http://localhost:8088/ and passes .taf and .tml requests to the TeraScript Server. To change this configuration:
- Open the webconfig folder found in the installation directory. Files in this folder are used to configure the Jetty web server. For advanced configurations, refer to the Jetty documentation found at http://www.eclipse.org/jetty/documentation/current/index.html Windows: Run Notepad as Administrator (right-click on Notepad and select ‘Run as Administrator’) to be able to save changes to the configuration files.
- To change the listener port: By default the public server listens on all IPs at 8088, while the config-server listens at localhost:8081. To change these ports, open server\webconfig\etc\jetty.xml and enter an unused port number on the line <Set name="port"> </Set> for the connector named public or config, respectively. Note: ports 80, 8080, 18179 may already be bound by TeraScript 7 or IIS if those services are running.
- To change the host name or webroot: The server ships with a default virtual host responding to “localhost” and mapped to the webroot folder c:\inetpub\webroot. To change these values open \webconfig\contexts\localhost.xml and change the lines <Set name="resourceBase">C:\inetpub\wwwroot</Set> to the new webroot and <Item>localhost</Item> to the new host name.
- To add an additional host name to the same webroot: Open \webconfig\contexts\localhost.xml, duplicate the line <Item>localhost</Item>, and change 'localhost' to the new host name.
- To add additional hosts with different webroot folders: Duplicate and rename \webconfig\contexts\localhost.xml. Open the new file and and change the lines <Set name="resourceBase">C:\inetpub\wwwroot</Set> to the new webroot and <Item>localhost</Item> to the new host name.
- To pass additional extensions or errors into TeraScript Server for processing, edit \webconfig\webapps\com.terascript.servlet\WEB-INF\web.xml and add additional extension stanzas or activate and modify the commented out example error configurations.
- Save the bootstrap.properties file and restart TeraScript Server 8.
At installation, the server will run in ‘development mode’ and be limited to executing a single thread. To activate ‘deployment mode’ and unlimited threads, please see ‘Activating TeraScript Server 8.’
Configuring IIS, Apache or another Web Server
All requests to TeraScript Server 8 go through the built-in Jetty web server. To use another front-end web server, configure your web server to send reverse proxy requests to the Jetty server. Documentation and support for reverse proxy configurations will be available later.
At installation, the server will run in ‘development mode’ and be limited to executing a single thread. To activate ‘deployment mode’ and unlimited threads, please see ‘Activating TeraScript Server 8.’
Activating TeraScript Server 8
To activate TS 8 and enable unlimited thread processing:
- Edit the bootstrap.properties file found in the shared directory. Windows: Run Notepad as Administrator (right-click on Notepad and select ‘Run as Administrator’) to be able to save changes to this file.
- Enter the email address and password of your TeraScript.com account on the lines ‘activationProfileName=’ and ‘activationProfilePassword=’.
- Enter a descriptive name for your computer on the line ‘activationServerName’.
- Enter ‘true’ on the line ‘deploymentMode=’.
- Save the bootstrap.properties file and restart TeraScript Server 8.
Scope Initialization Scripts
TS 8 can execute TML when a scope is initialized. By default, this will execute any .tml or .taf files you place in the scope initialization directory.
- Create the following directories in the webroot folder:
- Domain Scope: <@WEBROOT>/_terascript/scopes/init/domain
- User/Session Scope: <@WEBROOT>/_terascript/scopes/init/session
- Request Scope: <@WEBROOT>/_terascript/scopes/init/request
- Place .tml or .taf files with the code to be executed upon scope initialization in the respective directory.
Using ODBC Data Sources
To execute .taf files that contain ODBC data sources:
Assign the data source information into the dataSources configuration variable using the following syntax:
<@ASSIGNCONFIGVAR domain$datasources <@MULTIMAP type="any" <@ENTRY key="text" value=<@DATASOURCE url="text" credentials=<@CREDENTIALS username="text" password="text">>>>>
- The name of the data source entered in ‘key=’ should match the name of the ODBC data source in TeraScribe.
- The value of 'url=' should be the JDBC URL syntax provided by your JDBC driver.
- Add additional <@ENTRY> tags for additional datasource names/aliases.