Third-party:Web

From HemeraBook
Jump to: navigation, search

Since Hemera v0.2.

Tomcat availability

Hemera Web services module uses several third-party tools, including Apache Struts 2 and Apache Tomcat.
All third-party tools used by the web services module are embedded, but the Tomcat.
The module requires Servlet API 2.4 or higher and JSP 2.0 or higher; so you must have an installation of Apache Tomcat 5.5 or later.

N.B.: it can be a Tomcat installation on a remote computer BUT some information like processing systems given by the Web services module will only regard local activities.

Existing installation

If you already have such installation, you can go to configuration part.

From binary distribution

If you want to install a dedicated Tomcat for Hemera, it is recommended to:

  • download the binary distribution of Apache Tomcat 7 or later
  • uncompress the archive under HEMERA_TP_PATH/webServices/bin/
  • create a symbolic link named tomcat to the just created directory (e.g. apache-tomcat-7.0.12)


With package manager

If you prefer, you can install Tomcat with package manager (for instance to use others web applications on it).

RedHat-based distributions

yum install tomcat6 tomcat6-admin-webapps

Debian-based distributions

sudo apt-get install tomcat6 tomcat6-admin


Configuration

Tomcat user

In any case, you must define a tomcat user with the manager role, in the $TOMCAT_HOME/conf/tomcat-users.xml file.
For instance, you can add this line:

<user username="hemera" password="hemera" roles="manager"/>


Hemera configuration

After the installation of the version of your choice, check/update the following configuration elements

hemera.web.tomcat.*


Automatic start/stop

In case of local installation of a binary version, Hemera start/stop system can manage Tomcat start/stop.
If activated it will look for HEMERA_TP_PATH/webServices/bin/tomcat/bin/startup.sh (and shutdown.sh); if not found a warning (NOT fatal) will be printed.
For that, check/update the following configuration element

hemera.run.activation.tomcat