How to install J2EE without any add-on
If you want to use J2EE, you have to use an application server. The application server is an application/framework which provides the JavaEE functionality. Application server examples: Glassfish, Wildfly, Weblogic, ...
Tomcat is just a servlet container. It implements just part of the JavaEE specification. You can deploy applications on it, which contain servlets for example, but you will not have other JavaEE capabilities, like JPA, transaction handling, ...
Deploy JSP or servlets on CLI using Tomcat without any IDE - High level steps
- 1: create your jsp-servlet webapplication (https://www.baeldung.com/intro-to-servlets)
- 2: package your application as a
war
archive, either with maven or by java commands
- 3: start your tomcat instance
- 4: deploy your
.war
to tomcat (https://www.baeldung.com/tomcat-deploy-war)
- in short: you have to copy your
.war
file into the deployments folder of tomcat, namely into the ...<path_to_tomcat>/webapps
folder. Tomcat will automatically recognize and start your deployment.