Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the copy-the-code domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
How to Enable HTTP2 in Tomcat - PC✗3
How to Enable HTTP2 in Tomcat

How to Enable HTTP2 in Tomcat

HTTP/2 connectors use non-blocking I/O, only utilizing a container thread from the thread pool when there is data to read and write.

For more information read The HTTP2 upgrade protocol – Apache Tomcat 8 Configuration Reference.

There are two steps in enabling HTTP2 in Tomcat:

  1. Edit the server.xml file
  2. Restart Tomcat server

1. Open the server.xml file:

nano conf/server.xml

Add the following to the configuration:

<Connector port="443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/key.pem"
                         certificateFile="conf/cert.pem"
                         certificateChainFile="conf/chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>

If you are using a custom port for SSL/TLS make sure to change 443 port, and if your certificate files are not in the conf folder, make sure to update the file path of .pem files.

2. Save the changes and restart Tomcat server:

./shutdown.sh
./startup.sh
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.