Beispiel einer server.xml aus der Tomcat-Konfiguration

Beispiel der server.xml Datei für Tomcat 8 oder höher

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
	<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
	<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
	<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
	<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
	<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
	<GlobalNamingResources>
		<Resource 	name="UserDatabase"
			auth="Container"
			type="org.apache.catalina.UserDatabase"
			description="User database that can be updated and saved"
			factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
			pathname="conf/tomcat-users.xml" />
	</GlobalNamingResources>

<Service name="Catalina">
	<Connector port="8080" protocol="HTTP/1.1"
		connectionTimeout="20000"
		redirectPort="8443" />
	<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

<Engine name="Catalina" defaultHost="localhost">
	<Realm className="org.apache.catalina.realm.LockOutRealm">
		<Realm className="org.apache.catalina.realm.DataSourceRealm"
			debug="99"
			digest="MD5"
			dataSourceName="jdbc/b2bbp"
			localDataSource="true"
			userTable="B2BBP_ADM_ACCOUNT"
			userNameCol="userid"
			userCredCol="password"
			userRoleTable="B2BBP_ADM_USER" roleNameCol="roleid">
			<CredentialHandler className="org.apache.catalina.realm.NestedCredentialHandler">
				<CredentialHandler
				className="org.apache.catalina.realm.MessageDigestCredentialHandler"
				algorithm="md5" />
				<CredentialHandler
				className="org.apache.catalina.realm.MessageDigestCredentialHandler"
				algorithm="sha-512" />
			</CredentialHandler>
		</Realm>
	</Realm>

	<Host name="localhost"	appBase="webapps"
		unpackWARs="true" autoDeploy="false">

		<Valve className="org.apache.catalina.valves.AccessLogValve"
			directory="logs"
			prefix="localhost_access_log" suffix=".txt"
			pattern="%h %l %u %t &quot;%r&quot; %s %b" />
	</Host>
</Engine>
</Service>
</Server>
View Me   Edit Me