Wiki source code of Tomcat-Einstellungen
Hide last authors
| author | version | line-number | content | 
|---|---|---|---|
|                              | 
      1.1 | 1 | {{content/}} | 
| 2 | |||
|                              | 
      4.1 | 3 | The settings described on this page should be performed for every system. Additional optional settings include: | 
|        | 
      1.1 | 4 | |
|        | 
      4.1 | 5 | * [[Access via HTTPS>>doc:.Bereitstellung über HTTPS.WebHome]] | 
| 6 | Configuration of the Tomcat to provide access via HTTPS | ||
| 7 | * [[Using {{formcycle/}} with the root domain>>doc:Formcycle.SystemSettings.TomcatSettings.RootDomainAccess]] | ||
| 8 | Open {{formcycle/}} from the from the root domain, eg. {{code}}http://formcycle.eu/{{/code}}, instead of from a subdomain such as {{code}}http://formcycle.eu/formcycle/{{/code}} | ||
| 9 | * [[Changing the data directory>>doc:Formcycle.SystemSettings.TomcatSettings.ChangeDataDirectory]] | ||
| 10 | Directory containing data and settings used internally by {{formcycle case="dat"/}}. | ||
|        | 
      1.1 | 11 | |
|        | 
      4.1 | 12 | == Memory == | 
|        | 
      1.1 | 13 | |
|        | 
      4.1 | 14 | The following settings should be applied to increase the amount of available memory. | 
|        | 
      1.1 | 15 | |
| 16 | * -Xms512m | ||
|        | 
      4.1 | 17 | Initial size of the heap. | 
|        | 
      1.1 | 18 | * -Xmx4096m | 
|        | 
      4.1 | 19 | Maximum size of the heap. | 
|        | 
      1.1 | 20 | |
|        | 
      4.1 | 21 | **Example (Linux)** | 
|        | 
      1.1 | 22 | |
|        | 
      4.1 | 23 | The path to the configuration file is {{code language="none"}}TOMCAT_VERZEICHNIS/bin/setenv.sh{{/code}} | 
|        | 
      1.1 | 24 | |
| 25 | {{code language="sh"}} | ||
| 26 | export JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx4096m" | ||
| 27 | {{/code}} | ||
| 28 | |||
|        | 
      4.1 | 29 | == Setting on the connector == | 
|        | 
      1.1 | 30 | |
|        | 
      4.1 | 31 | The following settings should be made in the configuration file TOMCAT_VERZEICHNIS/conf/server.xml: | 
|        | 
      1.1 | 32 | |
| 33 | {{code language="xml"}} | ||
| 34 | <Connector port="80" protocol="HTTP/1.1" | ||
| 35 | connectionTimeout="20000" | ||
| 36 | redirectPort="8443" | ||
| 37 | URIEncoding="UTF-8" | ||
| 38 | maxPostSize="10485760" | ||
| 39 | maxHttpHeaderSize="65536" | ||
|        | 
      4.1 | 40 | relaxedQueryChars="[ \ ] ^ ` { | }" ></Connector> | 
|        | 
      1.1 | 41 | {{/code}} | 
| 42 | |||
| 43 | (% class="wikigeneratedid" %) | ||
|        | 
      4.1 | 44 | More information about the parameters you will find in the following sections. | 
|        | 
      1.1 | 45 | |
|        | 
      4.1 | 46 | == Limiting the upload file size == | 
|        | 
      1.1 | 47 | |
|        | 
      4.1 | 48 | You can change the maximum allowed file size for file uploads for the [[upload form element>>doc:Formcycle.Designer.Form.FormElements.Upload]], as well as the maximum size for uploads in the inbox. An error will be displayed when files larger than this limited are uploaded. | 
|        | 
      1.1 | 49 | |
|        | 
      4.1 | 50 | You can find the configuration file here: {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}} | 
|        | 
      1.1 | 51 | |
|        | 
      4.1 | 52 | The following option must be set or change on the //connector//: | 
|        | 
      1.1 | 53 | |
| 54 | {{code language="sh"}} | ||
|        | 
      4.1 | 55 | maxPostSize="maximum size in bytes" | 
|        | 
      1.1 | 56 | {{/code}} | 
| 57 | |||
|        | 
      4.1 | 58 | ==== Example for a maximum upload size of 10 MB, to be specified in bytes: ==== | 
|        | 
      1.1 | 59 | |
| 60 | {{code language="sh"}} | ||
| 61 | <Connector ... | ||
|        | 
      4.1 | 62 | maxPostSize="2097152" | 
|        | 
      1.1 | 63 | ... /> | 
| 64 | {{/code}} | ||
| 65 | |||
|        | 
      4.1 | 66 | == HTTP header size limit == | 
|        | 
      1.1 | 67 | |
|        | 
      4.1 | 68 | 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. | 
|        | 
      1.1 | 69 | |
|        | 
      4.1 | 70 | TYou can find the configuration file here: {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}}. | 
|        | 
      1.1 | 71 | |
|        | 
      4.1 | 72 | The following option must be set or change on the //connector//: | 
|        | 
      1.1 | 73 | |
| 74 | {{code language="sh"}} | ||
|        | 
      4.1 | 75 | maxHttpHeaderSize="Header size limit in bytes" | 
|        | 
      1.1 | 76 | {{/code}} | 
| 77 | |||
|        | 
      4.1 | 78 | ==== Example for a limit of 64KB, to be specified in bytes: ==== | 
|        | 
      1.1 | 79 | |
| 80 | {{code language="sh"}} | ||
| 81 | <Connector ... | ||
|        | 
      4.1 | 82 | maxHttpHeaderSize="65536" | 
|        | 
      1.1 | 83 | ... /> | 
| 84 | {{/code}} | ||
| 85 | |||
| 86 | == UTF-8 == | ||
| 87 | |||
|        | 
      4.1 | 88 | 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. | 
|        | 
      1.1 | 89 | |
|        | 
      4.1 | 90 | The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}} | 
|        | 
      1.1 | 91 | |
|        | 
      4.1 | 92 | The parameter should be set as follows on the connector: {{code language="none"}}URIEncoding="UTF-8"{{/code}}. | 
|        | 
      1.1 | 93 | |
|        | 
      4.1 | 94 | **Example** | 
|        | 
      1.1 | 95 | |
| 96 | {{code language="sh"}} | ||
|        | 
      4.1 | 97 | <Connector ... | 
|        | 
      1.1 | 98 | URIEncoding="UTF-8" | 
| 99 | ... /> | ||
| 100 | {{/code}} | ||
| 101 | |||
|        | 
      4.1 | 102 | If there are also display problems with filenames with special characters and/or umlauts, please add the Java parameter {{code language="none"}}-Dfile.encoding=UTF-8{{/code}}. Depending on the used operating system, this must either be specified in the configuration file or configuration view. | 
|        | 
      1.1 | 103 | |
|        | 
      4.1 | 104 | **Example (Linux)** | 
|        | 
      1.1 | 105 | |
|        | 
      4.1 | 106 | The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/bin/setenv.sh{{/code}} | 
| 107 | |||
|        | 
      1.1 | 108 | {{code language="sh"}} | 
| 109 | export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8" | ||
| 110 | {{/code}} | ||
| 111 | |||
|        | 
      4.1 | 112 | == Session timeout == | 
|        | 
      1.1 | 113 | |
|        | 
      4.1 | 114 | 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. | 
|        | 
      1.1 | 115 | |
|        | 
      4.1 | 116 | The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/webapps/formcycle/WEB-INF/web.xml{{/code}} | 
|        | 
      1.1 | 117 | |
| 118 | {{code language="xml"}} | ||
|        | 
      4.1 | 119 | <!-- Sets the sesssion timeout to 30 minutes --> | 
|        | 
      1.1 | 120 | <session-config> | 
|        | 
      4.1 | 121 | <session-timeout>30</session-timeout> | 
|        | 
      1.1 | 122 | </session-config> | 
| 123 | {{/code}} | ||
| 124 | |||
|        | 
      4.1 | 125 | == Context name == | 
|        | 
      1.1 | 126 | |
|        | 
      4.1 | 127 | The context name is used, for example, by [[Monitoring Beans>>doc:Formcycle.SystemSettings.Monitoring]] to monitor the server status. | 
|        | 
      2.1 | 128 | |
|        | 
      4.1 | 129 | The context name defaults to the name of the WAR file of {{formcycle/}}, but it can be changed when necessary by modifying the context parameter //XFC_CONTEXT_NAME// in the configuration file //web.xml//. | 
|        | 
      2.1 | 130 | |
| 131 | {{code language="xml"}} | ||
|        | 
      1.1 | 132 | <context-param> | 
| 133 | <param-name>XFC_CONTEXT_NAME</param-name> | ||
| 134 | <param-value>formcycle</param-value> | ||
| 135 | </context-param> | ||
| 136 | {{/code}} | ||
                                                          ![]()  | 
      1.2 | 137 | |
|        | 
      4.1 | 138 | == User path for Tomcat == | 
      ![]()  | 
      1.2 | 139 | |
|        | 
      4.1 | 140 | On some Linux-based systems, the Tomcat user does not have a user folder by default. However, one is needed so that {{formcycle/}} can store basic settings. The path of the user folder is usually defined in the {{code language="none"}}/etc/passwd{{/code}} file. | 
| 141 | 
  