Tomee Tomcat
Posted : admin On 1/25/2022Apache TomEE is a Java EE Web Profile-certified stack which is built on top of an Apache Tomcat base integrated with additional related technologies. It adds implementations for the following specifications (using the Apache project shown in parentheses): CDI - Apache OpenWebBeans EJB - Apache OpenEJB. Apache TomEE, pronounced 'Tommy', is an all-Apache Java EE 6 Web Profile certified stack where Apache Tomcat is top dog. Apache TomEE is assembled from a vanilla Apache Tomcat zip file. We start with Apache Tomcat, add our jars and zip up the rest. The result is Tomcat with added EE features - TomEE. On the other hand, Apache TomEE a certified Java Enterprise Edition (EE) stack that was developed on top of Tomcat plus integrated and bundled with additional Java EE related technologies. TomEE supports and implements the following specifications: CDI – Apache OpenWebBeans EJB – Apache OpenEJB.
Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer(SSL), are technologies which allow web browsers and web servers to communicateover a secured connection. This means that the data being sent is encrypted byone side, transmitted, then decrypted by the other side before processing.This is a two-way process, meaning that both the server AND the browser encryptall traffic before sending out data.
Another important aspect of the SSL/TLS protocol is Authentication. This meansthat during your initial attempt to communicate with a web server over a secureconnection, that server will present your web browser with a set ofcredentials, in the form of a 'Certificate', as proof the site is who and whatit claims to be. In certain cases, the server may also request a Certificatefrom your web browser, asking for proof that you are who you claimto be. This is known as 'Client Authentication,' although in practice this isused more for business-to-business (B2B) transactions than with individualusers. Most SSL-enabled web servers do not request Client Authentication.

openssl genrsa -des3 -out server.key 1024
Generate CSR

Now that we have the private key and the csr, we are ready to generate a X.509 self-signed certificate valid for one year by running next command:
Generate a Self-Signed Certificate
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Tomee 8 Tomcat Version
Prepare for Apache TomEE
openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -name test_server -caname root_ca
keytool -importkeystore -destkeystore keystore.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcalias test_server -destalias test_server
And now we have a keystore.jks file created at {userhome}/certs.
Installing Keystore into Apache TomEE
<Service name='Catalina'>
<Connector port='8443' protocol='HTTP/1.1'
maxThreads='150' SSLEnabled='true' scheme='https' secure='true'
keystoreFile='${user.home}/certs/keystore.jks' keystorePass='apachetomee'
Tomee Tomcat Model
clientAuth='false' sslProtocol='TLS' /></Service>
Preparing the Browser
Tomee Tomcat Difference
Before starting the server we need to add the server.crt as valid Authorities in browser.Apache Tomcat Tomee
In Firefox: Firefox Preferences -> Advanced -> View Certificates -> Authorities (tab) and then import the server.crt file.
In Chrome: Settings -> HTTPS/SSL -> Manage Certificates ... -> Authorities (tab) and then import the server.crt file.
We keep learning,
Alex.
Dog goes woof, Cat goes meow, Bird goes tweet and mouse goes squeek (What Does the Fox Say - Ylvis)
Music: https://www.youtube.com/watch?v=jofNR_WkoCE