Tomcat Deployment
Tomcat – Web Application Server Explained
Website vs Web Application
-
Website: Frontend only (DB optional)
-
Web Application: Frontend + Backend (DB mandatory)
What is Tomcat?
-
Java-based Web Application Server
-
Used to deploy Java applications
-
Free and open source
-
Platform independent
-
Default port: 8080
-
First released in 1999
Deployment Structure
-
.war→tomcat/webapps -
.jar→tomcat/lib
Popular Alternatives
-
Nginx
-
IIS
-
WebSphere
-
JBoss
-
GlassFish
-
WebLogic
📌 Tip: Jenkins slave can temporarily act as a Tomcat server.
Tomcat Installation & Configuration
Step 1: Create Server & Install Java
Step 2: Download Tomcat
Step 3: Extract Files
Step 4: Configure Users & Roles
Edit:
Add:
Step 5: Allow Manager App Access
Edit:
Delete line 21 and 22 (IP restriction).
Step 6: Start Tomcat
-
URL:
http://<PUBLIC-IP>:8080 -
Manager App login:
-
Username:
tomcat -
Password:
raham123
-
Automated Tomcat Setup Script
Deploying Application from Jenkins to Tomcat
Deployment Flow (Real Scenario)
-
Jenkins builds the project
-
WAR file is generated in workspace
-
WAR is uploaded to Tomcat Manager
-
Application goes live
Steps
-
Open Jenkins → Workspace
-
Copy the
.warfile (example:NETFLIX-1.2.2.war) -
Open Tomcat Manager
-
Choose WAR file
-
Click Deploy
🎉 Application is now live on Tomcat.
Comments
Post a Comment