Notice: These instructions are for Tomcat. Theoretically Roth should work with JBoss and GlassFish as well, but that has not be tested.
These instructions assume that the following are already installed.
(not included in zip file; see lib_requirements.zip)
Copy roth-lib.jar and all other needed JARs (from above list) to Tomcat's lib folder.
Copy Roth.war, RothDeveloper.war, and RothInstaller.war to Tomcat's webapps folder.
Create a MySQL user account (for the rest of these instructions, it is assumed that the username is 'rothusr' and the password is 'rothpwd' -- I would suggest choosing your own username and password), and run the following grant statements:
:::sql
CREATE DATABASE roth;
GRANT ALL PRIVILEGES ON roth.* TO 'rothusr'@'%';
(please note that for better security, you should change the above statement to restrict the allowed user connection to a specific host; for example 'localhost' if MySQL and Tomcat are on the same server)
server.xml
Within the Engine section make sure that your Realm looks like this:
:::xml
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="com.roth.realm.RothRealm"/>
</Realm>
Within the Host section, make sure that one of the following Valves is not commented out. Use the SingleSignOn valve for use in a lone tomcat node. Use the ClusterSingleSignOn valve for use in a cluster.
:::xml
<Valve className="org.apache.catalina.authenticator.SingleSignOn"/>
or
<Valve className="org.apache.catalina.ha.authenticator.ClusterSingleSignOn"/>
context.xml
Add the roth resource:
:::xml
<Resource name="roth" type="javax.sql.DataSource"
auth="Container"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/roth"
username="rothusr" password="rothpwd"
maxWaitMillis="10000" maxIdle="30" maxTotal="100"/>
web.xml
Add the rothTemp environment variable:
:::xml
<env-entry>
<env-entry-name>rothTemp</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${catalina.base}/temp/</env-entry-value>
</env-entry>
Important: You may instead choose to add the resource to server.xml with a resource link in context.xml. The difference is that if the resource is defined in server.xml, then the same resource will be used by all contexts (applications) running in that Tomcat instance, and if the resource is defined in context.xml, then each context running in that Tomcat instance will have it's own resource. What this means is that if a resource limits to 25 connections, the server.xml method would use at most 25 connections, where the context.xml method would use up to 25 connections per context (5 contexts would result in up to 125 connections).
Now, start the Tomcat server and test by pointing your browser at http://localhost:8080/RothInstaller to get to the installation page. It should read "Non Installed". Click on the "Install Roth" button to create the database tables. After installing, you will be automatically redirected to the Roth home page.
If using RothDeveloper with Oracle, you will need to add this startup argument to Tomcat:
:::script
-Doracle.jdbc.useFetchSizeWithLongColumn=true
Read here for more information, caveats, and other ways to implement this feature: https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html