REM on Apache Tomcat
By default REM runs on the Jetty web server bundled in the REM distribution package. The REM application is packaged as a standard war though, so running it on a different servlet container, like Apache Tomcat, is quite straightforward.
You will need:
-
the REM distribution package —
rhino-element-manager-<version>.zip
; expanded to a location of your choice. -
an Apache Tomcat installation — either downloaded and configured manually, or installed via a package manager; minimum supported version is
7.0.39
.
Setting up Tomcat to run REM
1 |
REM requires a few System Properties to be set in order to function properly. In your Apache Tomcat installation, edit (or create) REM_HOME="$CATALINA_BASE/rem_home" CATALINA_OPTS="-Drem.home=$REM_HOME -Dderby.stream.error.file=$REM_HOME/derby.log -Drem.norestart=true" CLASSPATH="$CATALINA_BASE/bin/rem-rmi.jar" If you wish to have REM store its working files in a different location, you can change the |
2 |
The |
3 |
Copy You should now be able to start Apache Tomcat and access REM at |
Customize REM logging
1 |
Unzip cd apache-tomcat-<version> mkdir rem-tmp cd rem-tmp unzip ../webapps/rem.war WEB-INF/classes/log4j.properties |
---|---|
2 |
Edit log4j.rootLogger=INFO, FILE, CONSOLE log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p <%t> [%c] %m%n log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.File=${rem.home}/rem.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p <%t> [%c] %m%n log4j.logger.rem=INFO |
3 |
Replace zip ../webapps/rem.war WEB-INF/classes/log4j.properties |
4 |
Remove temporary files: cd .. rm -rf rem-tmp |
See Log4j documentation for more information on logging configuration. |