blob: 419cb4a8b8e8ca568a5cfc4881dc9c745c561829 [file]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/docs/tomcat-http2-integration-guide.xml at 2026-05-18
| Rendered using Apache Maven Fluido Skin 2.0.0-M11
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" />
<title>Apache Tomcat 11 + Axis2 HTTP/2 Integration Guide - Production-Ready Configuration – Apache Axis2</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-2.0.0-M11.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script src="../js/apache-maven-fluido-2.0.0-M11.min.js"></script>
</head>
<body>
<div class="container-fluid container-fluid-top">
<header>
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h1><a href="https://www.apache.org/"><img class="class java.lang.Object" src="https://www.apache.org/images/asf_logo_wide.png" /> Apache Axis2</a></h1></div></div>
<div class="pull-right"><div id="bannerRight"><h1><a href="https://axis.apache.org/axis2/java/core/"><img class="class java.lang.Object" src="https://axis.apache.org/axis2/java/core/images/axis.jpg" /></a></h1></div></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2026-05-17<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.0.1<span class="divider">|</span></li>
<li><a href="https://www.apache.org" class="externalLink">Apache</a><span class="divider">/</span></li>
<li><a href="../index.html">Axis2/Java</a><span class="divider">/</span></li>
<li class="active">Apache Tomcat 11 + Axis2 HTTP/2 Integration Guide - Production-Ready Configuration</li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Axis2/Java</li>
<li><a href="../index.html">Home</a></li>
<li><a href="../download.html">Downloads</a></li>
<li><a href="javascript:void(0)"><span class="icon-chevron-down"></span>Release Notes</a>
<ul class="nav nav-list">
<li><a href="../release-notes/1.6.1.html">1.6.1</a></li>
<li><a href="../release-notes/1.6.2.html">1.6.2</a></li>
<li><a href="../release-notes/1.6.3.html">1.6.3</a></li>
<li><a href="../release-notes/1.6.4.html">1.6.4</a></li>
<li><a href="../release-notes/1.7.0.html">1.7.0</a></li>
<li><a href="../release-notes/1.7.1.html">1.7.1</a></li>
<li><a href="../release-notes/1.7.2.html">1.7.2</a></li>
<li><a href="../release-notes/1.7.3.html">1.7.3</a></li>
<li><a href="../release-notes/1.7.4.html">1.7.4</a></li>
<li><a href="../release-notes/1.7.5.html">1.7.5</a></li>
<li><a href="../release-notes/1.7.6.html">1.7.6</a></li>
<li><a href="../release-notes/1.7.7.html">1.7.7</a></li>
<li><a href="../release-notes/1.7.8.html">1.7.8</a></li>
<li><a href="../release-notes/1.7.9.html">1.7.9</a></li>
<li><a href="../release-notes/1.8.0.html">1.8.0</a></li>
<li><a href="../release-notes/1.8.1.html">1.8.1</a></li>
<li><a href="../release-notes/1.8.2.html">1.8.2</a></li>
<li><a href="../release-notes/2.0.0.html">2.0.0</a></li>
<li><a href="../release-notes/2.0.1.html">2.0.1</a></li>
</ul></li>
<li><a href="../modules/index.html">Modules</a></li>
<li><a href="../tools/index.html">Tools</a></li>
<li class="nav-header">Documentation</li>
<li><a href="../docs/toc.html">Table of Contents</a></li>
<li><a href="../docs/installationguide.html">Installation Guide</a></li>
<li><a href="../docs/quickstartguide.html">QuickStart Guide</a></li>
<li><a href="../docs/userguide.html">User Guide</a></li>
<li><a href="../docs/jaxws-guide.html">JAXWS Guide</a></li>
<li><a href="../docs/pojoguide.html">POJO Guide</a></li>
<li><a href="../docs/spring.html">Spring Guide</a></li>
<li><a href="../docs/webadminguide.html">Web Administrator&apos;s Guide</a></li>
<li><a href="../docs/migration.html">Migration Guide (from Axis1)</a></li>
<li class="nav-header">Resources</li>
<li><a href="../faq.html">FAQ</a></li>
<li><a href="https://github.com/apache/axis-axis2-java-core" class="externalLink">Source Code</a></li>
<li class="nav-header">Get Involved</li>
<li><a href="../overview.html">Overview</a></li>
<li><a href="../mail-lists.html">Mailing Lists</a></li>
<li><a href="../release-process.html">Release Process</a></li>
<li><a href="../guidelines.html">Developer Guidelines</a></li>
<li><a href="../siteHowTo.html">Build the Site</a></li>
<li class="nav-header">Project Information</li>
<li><a href="https://github.com/apache/axis-axis2-java-core/graphs/contributors" class="externalLink">Contributors</a></li>
<li><a href="https://issues.apache.org/jira/projects/AXIS2/issues" class="externalLink">Issues</a></li>
<li class="nav-header">Apache</li>
<li><a href="https://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsorship</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a></li>
<li><a href="https://www.apache.org/security/" class="externalLink">Security</a></li>
</ul>
</nav>
<div class="well sidebar-nav">
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
</div>
</div>
</header>
<main id="bodyColumn" class="span10">
<section><a id="Apache_Tomcat_11_.2B_Axis2_HTTP.2F2_Integration_Guide"></a>
<h1>Apache Tomcat 11 + Axis2 HTTP/2 Integration Guide</h1>
<div style="background-color: #e8f5e8; border: 1px solid #4CAF50; padding: 15px; margin: 10px 0;">
<section><section><section><a id="a.3F.3F_Apache_Tomcat_11_HTTP.2F2_-_Excellent_Support_with_Simplified_Configuration"></a>
<h4>&#x1f680; Apache Tomcat 11 HTTP/2 - Excellent Support with Simplified Configuration</h4>
</section></section></section><section><a id="Tomcat_11_HTTP.2F2_Configuration_.28Production-Optimized.29"></a>
<h2>Tomcat 11 HTTP/2 Configuration (Production-Optimized)</h2>
<section><a id="a1._Complete_server.xml_HTTP.2F2_Configuration"></a>
<h3>1. Complete server.xml HTTP/2 Configuration</h3>
<pre>
&lt;!-- Apache Tomcat 11 - HTTP/2 Optimized Configuration --&gt;
&lt;!-- Aligned with Axis2 Enhanced Moshi H2 Processing --&gt;
&lt;Server port=&quot;8005&quot; shutdown=&quot;SHUTDOWN&quot;&gt;
&lt;!-- Global Naming Resources --&gt;
&lt;GlobalNamingResources&gt;
&lt;Resource name=&quot;UserDatabase&quot; auth=&quot;Container&quot;
type=&quot;org.apache.catalina.UserDatabase&quot;
description=&quot;User database that can be updated and saved&quot;
factory=&quot;org.apache.catalina.users.MemoryUserDatabaseFactory&quot;
pathname=&quot;conf/tomcat-users.xml&quot; /&gt;
&lt;/GlobalNamingResources&gt;
&lt;!-- Thread Pool for HTTP/2 Optimization --&gt;
&lt;!-- Aligned with Axis2 Enhanced Moshi H2 async processing --&gt;
&lt;Service name=&quot;Catalina&quot;&gt;
&lt;!-- HTTP/2 Thread Pool Configuration --&gt;
&lt;Executor name=&quot;tomcatThreadPool&quot;
namePrefix=&quot;catalina-exec-&quot;
maxThreads=&quot;200&quot; &lt;!-- Matches HTTP/2 concurrent streams --&gt;
minSpareThreads=&quot;20&quot;
maxIdleTime=&quot;600000&quot; &lt;!-- 10 minutes --&gt;
prestartminSpareThreads=&quot;true&quot; /&gt;
&lt;!-- HTTP Connector with HTTP/2 Upgrade --&gt;
&lt;Connector executor=&quot;tomcatThreadPool&quot;
port=&quot;8080&quot;
protocol=&quot;HTTP/1.1&quot;
redirectPort=&quot;8443&quot;
maxPostSize=&quot;104857600&quot; &lt;!-- 100MB for large JSON payloads --&gt;
connectionTimeout=&quot;300000&quot; &lt;!-- 5 minutes for large payload processing --&gt;
keepAliveTimeout=&quot;300000&quot; &lt;!-- Keep-alive for performance --&gt;
maxKeepAliveRequests=&quot;1000&quot; &lt;!-- High keep-alive for HTTP/2 benefits --&gt;
compression=&quot;on&quot; &lt;!-- JSON compression --&gt;
compressionMinSize=&quot;2048&quot; &lt;!-- Compress &gt;2KB JSON --&gt;
noCompressionUserAgents=&quot;gozilla, traviata&quot;
compressableMimeType=&quot;application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css&quot; /&gt;
&lt;!-- HTTPS Connector with Native HTTP/2 Support --&gt;
&lt;!-- PRODUCTION-OPTIMIZED: Native HTTP/2 implementation --&gt;
&lt;Connector executor=&quot;tomcatThreadPool&quot;
port=&quot;8443&quot;
protocol=&quot;org.apache.coyote.http11.Http11AprProtocol&quot;
maxPostSize=&quot;104857600&quot; &lt;!-- 100MB for large JSON --&gt;
SSLEnabled=&quot;true&quot;
scheme=&quot;https&quot;
secure=&quot;true&quot;
connectionTimeout=&quot;300000&quot; &lt;!-- 5 minutes --&gt;
keepAliveTimeout=&quot;300000&quot; &lt;!-- Persistent connections --&gt;
&lt;!-- HTTP/2 Configuration Parameters --&gt;
&lt;!-- ALIGNED: Buffer sizes match Enhanced Moshi H2 --&gt;
upgradeAsyncTimeout=&quot;300000&quot; &lt;!-- HTTP/2 upgrade timeout --&gt;
http2MaxConcurrentStreams=&quot;200&quot; &lt;!-- High concurrency --&gt;
http2InitialWindowSize=&quot;2097152&quot; &lt;!-- 2MB: avoids flow-control round trips --&gt;
http2MaxFrameSize=&quot;32768&quot; &lt;!-- 32KB - aligned with buffer management --&gt;
http2MaxHeaderTableSize=&quot;8192&quot; &lt;!-- 8KB header table --&gt;
http2MaxHeaderListSize=&quot;32768&quot; &lt;!-- 32KB header list --&gt;
http2EnablePush=&quot;false&quot; &lt;!-- Disabled for web services --&gt;
&lt;!-- SSL Configuration --&gt;
SSLCertificateFile=&quot;/path/to/your/certificate.crt&quot;
SSLCertificateKeyFile=&quot;/path/to/your/private.key&quot;
SSLCertificateChainFile=&quot;/path/to/your/chain.crt&quot;
SSLProtocol=&quot;TLSv1.2+TLSv1.3&quot; &lt;!-- Modern TLS for HTTP/2 --&gt;
SSLCipherSuite=&quot;ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384&quot;
SSLHonorCipherOrder=&quot;true&quot;
&lt;!-- JSON Processing Optimization --&gt;
compression=&quot;on&quot;
compressionMinSize=&quot;2048&quot;
compressableMimeType=&quot;application/json,application/xml&quot; /&gt;
&lt;!-- Engine Configuration --&gt;
&lt;Engine name=&quot;Catalina&quot; defaultHost=&quot;localhost&quot;&gt;
&lt;!-- Host Configuration with HTTP/2 Access Logging --&gt;
&lt;Host name=&quot;localhost&quot;
appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot;
autoDeploy=&quot;true&quot;&gt;
&lt;!-- HTTP/2 + JSON Performance Access Log --&gt;
&lt;Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot;
directory=&quot;logs&quot;
prefix=&quot;axis2_http2_access_log&quot;
suffix=&quot;.txt&quot;
pattern=&quot;%h %l %u %t &quot;%r&quot; %s %b %D Protocol:%{org.apache.coyote.request.protocol}r JSON-Size:%{Content-Length}o Time:%T&quot;
resolveHosts=&quot;false&quot; /&gt;
&lt;!-- JSON Compression for Axis2 Responses --&gt;
&lt;Context&gt;
&lt;Valve className=&quot;org.apache.catalina.valves.rewrite.RewriteValve&quot; /&gt;
&lt;/Context&gt;
&lt;/Host&gt;
&lt;/Engine&gt;
&lt;/Service&gt;
&lt;/Server&gt;
</pre>
</section><section><a id="a2._Key_Configuration_Highlights"></a>
<h3>2. Key Configuration Highlights</h3>
<table class="bodyTableBorder">
<tr class="a">
<th>Parameter</th>
<th>Tomcat 11 Value</th>
<th>Optimization Purpose</th>
<th>WildFly Equivalent</th></tr>
<tr class="b">
<td><strong>http2MaxConcurrentStreams</strong></td>
<td>200</td>
<td>High multiplexing for large JSON APIs</td>
<td>http2-max-concurrent-streams=&quot;200&quot;</td></tr>
<tr class="a">
<td><strong>http2InitialWindowSize</strong></td>
<td>2097152 (2MB)</td>
<td>Avoids flow-control round trips on large responses</td>
<td>http2-initial-window-size=&quot;2097152&quot;</td></tr>
<tr class="b">
<td><strong>http2MaxFrameSize</strong></td>
<td>32768 (32KB)</td>
<td>Optimal for JSON streaming</td>
<td>http2-max-frame-size=&quot;32768&quot;</td></tr>
<tr class="a">
<td><strong>maxPostSize</strong></td>
<td>104857600 (100MB)</td>
<td>Large JSON payload support</td>
<td>max-post-size=&quot;104857600&quot;</td></tr>
<tr class="b">
<td><strong>connectionTimeout</strong></td>
<td>300000 (5min)</td>
<td>Large payload processing time</td>
<td>no-request-timeout=&quot;300000&quot;</td></tr>
<tr class="a">
<td><strong>http2EnablePush</strong></td>
<td>false</td>
<td>Disabled for web services</td>
<td>http2-enable-push=&quot;false&quot;</td></tr>
</table>
</section></section><section><a id="Axis2_Integration_Configuration"></a>
<h2>Axis2 Integration Configuration</h2>
<section><a id="a1._Enhanced_axis2.xml_for_Tomcat_HTTP.2F2"></a>
<h3>1. Enhanced axis2.xml for Tomcat HTTP/2</h3>
<pre>
&lt;!-- axis2.xml - Tomcat 11 + HTTP/2 + Enhanced Moshi H2 Configuration --&gt;
&lt;axisconfig name=&quot;AxisJava2.0-Tomcat11-HTTP2-EnhancedMoshiH2&quot;&gt;
&lt;!-- JSON processing mode and Tomcat HTTP/2 tuning are configured in
Tomcat's server.xml (compression, keep-alive, buffer sizes, etc.),
not in axis2.xml. Use the standard JSON message builder below. --&gt;
&lt;!-- Enhanced JSON Message Builder --&gt;
&lt;messageBuilder contentType=&quot;application/json&quot;
class=&quot;org.apache.axis2.json.moshih2.EnhancedMoshiJsonBuilder&quot;/&gt;
&lt;!-- Enhanced JSON Message Formatter --&gt;
&lt;messageFormatter contentType=&quot;application/json&quot;
class=&quot;org.apache.axis2.json.moshih2.EnhancedMoshiJsonFormatter&quot;/&gt;
&lt;!-- HTTP/1.1 Transport (Fallback) --&gt;
&lt;transportSender name=&quot;http&quot;
class=&quot;org.apache.axis2.transport.http.impl.httpclient5.HTTPClient5TransportSender&quot;&gt;
&lt;parameter name=&quot;PROTOCOL&quot;&gt;HTTP/1.1&lt;/parameter&gt;
&lt;/transportSender&gt;
&lt;!-- HTTP/2 Transport (Coordinated with Tomcat 11) --&gt;
&lt;transportSender name=&quot;h2&quot;
class=&quot;org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender&quot;&gt;
&lt;parameter name=&quot;PROTOCOL&quot;&gt;HTTP/2.0&lt;/parameter&gt;
&lt;!-- Coordination with Tomcat 11 HTTP/2 --&gt;
&lt;parameter name=&quot;maxConcurrentStreams&quot;&gt;200&lt;/parameter&gt; &lt;!-- Matches Tomcat --&gt;
&lt;parameter name=&quot;initialWindowSize&quot;&gt;2097152&lt;/parameter&gt; &lt;!-- 2MB: avoids flow-control round trips --&gt;
&lt;parameter name=&quot;maxFrameSize&quot;&gt;32768&lt;/parameter&gt; &lt;!-- 32KB - matches Tomcat --&gt;
&lt;parameter name=&quot;maxConnectionsTotal&quot;&gt;50&lt;/parameter&gt;
&lt;parameter name=&quot;maxConnectionsPerRoute&quot;&gt;10&lt;/parameter&gt;
&lt;parameter name=&quot;connectionTimeout&quot;&gt;60000&lt;/parameter&gt; &lt;!-- 1 minute connection --&gt;
&lt;parameter name=&quot;responseTimeout&quot;&gt;300000&lt;/parameter&gt; &lt;!-- 5min response timeout --&gt;
&lt;!-- JSON streaming and compression are handled by the message formatter
and Tomcat's server.xml respectively &#x2014; no additional transport
sender parameters are needed for Moshi or Tomcat integration. --&gt;
&lt;/transportSender&gt;
&lt;/axisconfig&gt;
</pre>
</section></section><section><a id="Advanced_Configuration_Options"></a>
<h2>Advanced Configuration Options</h2>
<section><a id="a1._SSL.2FTLS_Certificate_Setup"></a>
<h3>1. SSL/TLS Certificate Setup</h3>
<p><strong>Tomcat 11 simplifies SSL setup compared to WildFly</strong>:</p>
<section><a id="Option_A.3A_APR.2FNative_SSL_.28Recommended_for_Production.29"></a>
<h4>Option A: APR/Native SSL (Recommended for Production)</h4>
<pre>
# Install Tomcat Native Library (Ubuntu/Debian)
sudo apt-get install libtcnative-1 openssl-dev
# Certificate configuration in server.xml
SSLCertificateFile=&quot;/etc/ssl/certs/your-domain.crt&quot;
SSLCertificateKeyFile=&quot;/etc/ssl/private/your-domain.key&quot;
SSLCertificateChainFile=&quot;/etc/ssl/certs/chain.crt&quot;
</pre>
</section><section><a id="Option_B.3A_Java_KeyStore_SSL"></a>
<h4>Option B: Java KeyStore SSL</h4>
<pre>
# Generate keystore
keytool -genkeypair -keyalg RSA -keysize 2048 -keystore tomcat-keystore.jks \
-alias tomcat -dname &quot;CN=your-domain.com,OU=IT,O=YourOrg,C=US&quot;
# Server.xml configuration
&lt;Connector port=&quot;8443&quot;
protocol=&quot;org.apache.coyote.http11.Http11NioProtocol&quot;
maxPostSize=&quot;104857600&quot;
SSLEnabled=&quot;true&quot;
keystoreFile=&quot;/path/to/tomcat-keystore.jks&quot;
keystorePass=&quot;your-password&quot;
keyAlias=&quot;tomcat&quot; /&gt;
</pre>
</section></section><section><a id="a2._Memory_Optimization_for_HTTP.2F2_.2B_JSON_Processing"></a>
<h3>2. Memory Optimization for HTTP/2 + JSON Processing</h3>
<section><a id="JVM_Memory_Settings_.28catalina.sh.29"></a>
<h4>JVM Memory Settings (catalina.sh)</h4>
<pre>
# Memory-optimized JVM settings for HTTP/2 + Enhanced Moshi H2
export CATALINA_OPTS=&quot;$CATALINA_OPTS -Xms2048m -Xmx4096m&quot;
export CATALINA_OPTS=&quot;$CATALINA_OPTS -XX:+UseG1GC&quot;
export CATALINA_OPTS=&quot;$CATALINA_OPTS -XX:MaxGCPauseMillis=200&quot;
export CATALINA_OPTS=&quot;$CATALINA_OPTS -XX:G1HeapRegionSize=16m&quot;
# HTTP/2 Connection Pool Optimization
export CATALINA_OPTS=&quot;$CATALINA_OPTS -Djava.net.preferIPv6Addresses=false&quot;
export CATALINA_OPTS=&quot;$CATALINA_OPTS -Dorg.apache.coyote.http2.Http2Protocol.maxConcurrentStreams=200&quot;
# Enhanced Moshi H2 Optimization
export CATALINA_OPTS=&quot;$CATALINA_OPTS -Daxis2.json.moshi.h2.enabled=true&quot;
export CATALINA_OPTS=&quot;$CATALINA_OPTS -Daxis2.json.moshi.h2.async.threshold=1048576&quot;
</pre>
</section></section><section><a id="a3._Production_Monitoring_Configuration"></a>
<h3>3. Production Monitoring Configuration</h3>
<section><a id="Enhanced_Access_Logging"></a>
<h4>Enhanced Access Logging</h4>
<pre>
&lt;!-- HTTP/2 + JSON Performance Monitoring --&gt;
&lt;Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot;
directory=&quot;logs&quot;
prefix=&quot;http2_performance&quot;
suffix=&quot;.log&quot;
pattern=&quot;%h %u %t &quot;%r&quot; %s %b %D Protocol:%{org.apache.coyote.request.protocol}r
Streams:%{http2.concurrent.streams}r
JSON-Size:%{Content-Length}o
Moshi-Processing:%{X-Moshi-H2-Processing-Time}o
Compression:%{Accept-Encoding}i&quot; /&gt;
</pre>
</section></section></section><section><a id="Production_Deployment_Guide"></a>
<h2>Production Deployment Guide</h2>
<section><a id="a1._Step-by-Step_Deployment"></a>
<h3>1. Step-by-Step Deployment</h3>
<section><a id="Step_1.3A_Install_Tomcat_11"></a>
<h4>Step 1: Install Tomcat 11</h4>
<pre>
# Download and extract Tomcat 11
cd /opt
sudo wget https://downloads.apache.org/tomcat/tomcat-11/v11.0.x/bin/apache-tomcat-11.0.x.tar.gz
sudo tar -xzf apache-tomcat-11.0.x.tar.gz
sudo mv apache-tomcat-11.0.x tomcat11
sudo chown -R tomcat:tomcat /opt/tomcat11
</pre>
</section><section><a id="Step_2.3A_Configure_HTTP.2F2_.28Replace_server.xml.29"></a>
<h4>Step 2: Configure HTTP/2 (Replace server.xml)</h4>
<pre>
# Backup original configuration
sudo cp /opt/tomcat11/conf/server.xml /opt/tomcat11/conf/server.xml.backup
# Apply HTTP/2 optimized configuration (use the server.xml above)
sudo nano /opt/tomcat11/conf/server.xml
</pre>
</section><section><a id="Step_3.3A_Deploy_Axis2_with_Enhanced_Moshi_H2"></a>
<h4>Step 3: Deploy Axis2 with Enhanced Moshi H2</h4>
<pre>
# Deploy your Axis2 WAR with Enhanced Moshi H2
sudo cp your-axis2-app.war /opt/tomcat11/webapps/
# Configure axis2.xml with HTTP/2 settings (use configuration above)
# Update WEB-INF/conf/axis2.xml in your deployed WAR
</pre>
</section><section><a id="Step_4.3A_Configure_SSL_Certificates"></a>
<h4>Step 4: Configure SSL Certificates</h4>
<pre>
# Place certificates in secure location
sudo mkdir -p /etc/tomcat11/ssl
sudo cp your-domain.crt /etc/tomcat11/ssl/
sudo cp your-domain.key /etc/tomcat11/ssl/
sudo chown -R tomcat:tomcat /etc/tomcat11/ssl
sudo chmod 600 /etc/tomcat11/ssl/*
</pre>
</section><section><a id="Step_5.3A_Start_and_Validate"></a>
<h4>Step 5: Start and Validate</h4>
<pre>
# Start Tomcat
sudo systemctl start tomcat11
# Validate HTTP/2 is working
curl -k --http2 --location 'https://localhost:8443/your-app/services/YourService' \
--header 'Content-Type: application/json' \
--data '{&quot;test&quot;: &quot;HTTP/2 validation&quot;}' \
--trace-ascii trace.log
# Check for HTTP/2 in trace.log
grep &quot;HTTP/2&quot; trace.log
</pre>
</section></section><section><a id="a2._Performance_Validation"></a>
<h3>2. Performance Validation</h3>
<section><a id="Validate_HTTP.2F2_Protocol_Negotiation"></a>
<h4>Validate HTTP/2 Protocol Negotiation</h4>
<pre>
# Test HTTP/2 negotiation
openssl s_client -connect localhost:8443 -alpn h2
# Expected output should show:
# ALPN protocol: h2
# Protocol: TLSv1.3
</pre>
</section><section><a id="Test_Large_JSON_Payload_Processing"></a>
<h4>Test Large JSON Payload Processing</h4>
<pre>
# Test large payload with Enhanced Moshi H2
curl -k --http2 -X POST 'https://localhost:8443/your-app/services/JsonService' \
--header 'Content-Type: application/json' \
--data @large-test-payload.json \
--output response.json \
--write-out &quot;Time: %{time_total}s, Size: %{size_download} bytes, HTTP: %{http_version}\n&quot;
# Should show HTTP/2.0 and fast processing times
</pre>
</section></section><section><a id="a3._Monitoring_and_Troubleshooting"></a>
<h3>3. Monitoring and Troubleshooting</h3>
<section><a id="HTTP.2F2_Metrics_Monitoring"></a>
<h4>HTTP/2 Metrics Monitoring</h4>
<pre>
# Monitor access logs for HTTP/2 performance
tail -f /opt/tomcat11/logs/http2_performance.log
# Key metrics to watch:
# - Protocol: HTTP/2.0
# - Concurrent streams usage
# - JSON processing times
# - Compression ratios
</pre>
</section><section><a id="JVM_Performance_Monitoring"></a>
<h4>JVM Performance Monitoring</h4>
<pre>
# Monitor JVM metrics
jstat -gc -t $(pgrep -f tomcat) 5s
# Monitor HTTP/2 connections
netstat -an | grep :8443 | grep ESTABLISHED | wc -l
</pre>
</div>
</section></section></section>
</main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>© 2004–2026
<a href="https://www.apache.org/">The Apache Software Foundation</a>
</p>
</div>
</div>
</footer>
</body>
</html>