Tomcat settings


The settings described on this page should be performed for every system. Additional optional settings include:

Memory

The following settings should be applied to increase the amount of available memory.

  • -Xms512m
    Initial size of the heap.
  • -Xmx4096m
    Maximum size of the heap.

Example (Linux)

The path to the configuration file is TOMCAT_VERZEICHNIS/bin/setenv.sh

export JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx4096m"

Setting on the connector

The following settings should be made in the configuration file TOMCAT_VERZEICHNIS/conf/server.xml:

<Connector port="80" protocol="HTTP/1.1"
          connectionTimeout="20000"
          redirectPort="8443"
          URIEncoding="UTF-8"
          maxPostSize="10485760"
          maxHttpHeaderSize="65536"
          relaxedQueryChars="[ \ ] ^ ` { | }" ></Connector>

More information about the parameters you will find in the following sections.

Limiting the upload file size

You can change the maximum allowed file size for file uploads for the upload form element, as well as the maximum size for uploads in the inbox. An error will be displayed when files larger than this limited are uploaded.

You can find the configuration file here: TOMCAT_DIRECTORY/conf/server.xml

The following option must be set or change on the connector:

maxPostSize="maximum size in bytes"

Example for a maximum upload size of 10 MB, to be specified in bytes:

<Connector ...
           maxPostSize="2097152"
           ... />

HTTP header size limit

When an incoming HTTP request is made, Tomcat will refuse to accept the request when the HTTP headers are too large and return a 400 error (invalid request). With this option, you can change that limit. This may be neccessary when using the Kerberos authentication protocol, which makes use of many HTTP headers.

TYou can find the configuration file here: TOMCAT_DIRECTORY/conf/server.xml.

The following option must be set or change on the connector:

maxHttpHeaderSize="Header size limit in bytes"

Example for a limit of 64KB, to be specified in bytes:

<Connector ...
           maxHttpHeaderSize="65536"
           ... />

UTF-8

When you notice issues with the special characters of foreign letters, for example when translating a form to Arabic or Chinese, check whether the URIEncoding has been set on the connector.

The path to the configuration file is TOMCAT_DIRECTORY/conf/server.xml

The parameter should be set as follows on the connector: URIEncoding="UTF-8".

Example

<Connector ...
           URIEncoding="UTF-8"
           ... />

If there are also display problems with filenames with special characters and/or umlauts, please add the Java parameter -Dfile.encoding=UTF-8. Depending on the used operating system, this must either be specified in the configuration file or configuration view.

Example (Linux)

The path to the configuration file is TOMCAT_DIRECTORY/bin/setenv.sh

export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"

Session timeout

Should the default setting of 30 minutes not be sufficient, the session timeout can be increased by modifying the file web.xml. Uses will be logged out when they are idle longer than this limit.

The path to the  configuration file is TOMCAT_DIRECTORY/webapps/formcycle/WEB-INF/web.xml

<!-- Sets the sesssion timeout to 30 minutes -->
<session-config>
   <session-timeout>30</session-timeout>
</session-config>

Context name

The context name is used, for example, by Monitoring Beans to monitor the server status.

The context name defaults to the name of the WAR file of Xima® Formcycle, but it can be changed when necessary by modifying the context parameter XFC_CONTEXT_NAME in the configuration file web.xml.

<context-param>
 <param-name>XFC_CONTEXT_NAME</param-name>
 <param-value>formcycle</param-value>
</context-param>

User path for Tomcat

On some Linux-based systems, the Tomcat user does not have a user folder by default. However, one is needed so that Xima® Formcycle can store basic settings. The path of the user folder is usually defined in the /etc/passwd file.