Wiki source code of Tomcat-Einstellungen


Show last authors
1 {{content/}}
2
3 The settings described on this page should be performed for every system. Additional optional settings include:
4
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"/}}.
11
12 == Memory ==
13
14 The following settings should be applied to increase the amount of available memory.
15
16 * -Xms512m
17 Initial size of the heap.
18 * -Xmx4096m
19 Maximum size of the heap.
20
21 **Example (Linux)**
22
23 The path to the configuration file is {{code language="none"}}TOMCAT_VERZEICHNIS/bin/setenv.sh{{/code}}
24
25 {{code language="sh"}}
26 export JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx4096m"
27 {{/code}}
28
29 == Setting on the connector ==
30
31 The following settings should be made in the configuration file TOMCAT_VERZEICHNIS/conf/server.xml:
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"
40 relaxedQueryChars="[ \ ] ^ ` { | }" ></Connector>
41 {{/code}}
42
43 (% class="wikigeneratedid" %)
44 More information about the parameters you will find in the following sections.
45
46 == Limiting the upload file size ==
47
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.
49
50 You can find the configuration file here: {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}}
51
52 The following option must be set or change on the //connector//:
53
54 {{code language="sh"}}
55 maxPostSize="maximum size in bytes"
56 {{/code}}
57
58 ==== Example for a maximum upload size of 10 MB, to be specified in bytes: ====
59
60 {{code language="sh"}}
61 <Connector ...
62 maxPostSize="2097152"
63 ... />
64 {{/code}}
65
66 == HTTP header size limit ==
67
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.
69
70 TYou can find the configuration file here: {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}}.
71
72 The following option must be set or change on the //connector//:
73
74 {{code language="sh"}}
75 maxHttpHeaderSize="Header size limit in bytes"
76 {{/code}}
77
78 ==== Example for a limit of 64KB, to be specified in bytes: ====
79
80 {{code language="sh"}}
81 <Connector ...
82 maxHttpHeaderSize="65536"
83 ... />
84 {{/code}}
85
86 == UTF-8 ==
87
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.
89
90 The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/conf/server.xml{{/code}}
91
92 The parameter should be set as follows on the connector: {{code language="none"}}URIEncoding="UTF-8"{{/code}}.
93
94 **Example**
95
96 {{code language="sh"}}
97 <Connector ...
98 URIEncoding="UTF-8"
99 ... />
100 {{/code}}
101
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.
103
104 **Example (Linux)**
105
106 The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/bin/setenv.sh{{/code}}
107
108 {{code language="sh"}}
109 export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"
110 {{/code}}
111
112 == Session timeout ==
113
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.
115
116 The path to the configuration file is {{code language="none"}}TOMCAT_DIRECTORY/webapps/formcycle/WEB-INF/web.xml{{/code}}
117
118 {{code language="xml"}}
119 <!-- Sets the sesssion timeout to 30 minutes -->
120 <session-config>
121 <session-timeout>30</session-timeout>
122 </session-config>
123 {{/code}}
124
125 == Context name ==
126
127 The context name is used, for example, by [[Monitoring Beans>>doc:Formcycle.SystemSettings.Monitoring]] to monitor the server status.
128
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//.
130
131 {{code language="xml"}}
132 <context-param>
133 <param-name>XFC_CONTEXT_NAME</param-name>
134 <param-value>formcycle</param-value>
135 </context-param>
136 {{/code}}
137
138 == User path for Tomcat ==
139
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.