Topic 8: Packaging and Deployment - zhamri/CSC584-Enterprise_Programming GitHub Wiki
Goal
To enable students to package and deploy a Java web application into a web server so that it can be accessed and tested in a real deployment environment.
🎯 Learning Objectives
Students should be able to:
- Explain the purpose of packaging in enterprise applications
- Identify different Java EE modules (Web, EJB)
- Package a web application into a WAR file
- Deploy a web application to a server (e.g., Apache Tomcat)
- Understand deployment descriptors and configuration
📌 Topics to Cover
- Packaging Concepts
- Why is packaging needed
- Structure of a web application
- Java EE Application Packaging
- Web module (WAR file)
- EJB module (concept only)
- Web Application Structure
- WEB-INF folder
- web.xml (deployment descriptor)
- Deployment Descriptors
- Purpose of web.xml
- Servlet mapping
- Deployment Tools
- Apache Tomcat
- IDE deployment (IntelliJ / Eclipse / VS Code)
- Deployment Process
- Build project
- Generate WAR file
- Deploy to server
🛠️ Hands-on Activity
Activity: Deploy Student Management System to Tomcat
Students are required to package and deploy their developed system.
-
Prepare Project Ensure system is complete:
- Servlet
- JSP
- JavaBean
- JDBC
-
Package Application
- Convert project into a WAR file
- Example:
student-system.war
-
Deploy to Server (Tomcat)
- Copy WAR file into:
/webapps/ - Start Tomcat server
- Copy WAR file into:
-
Run Application Access system via browser:
http://localhost:8080/student-system
-
Verify Functionality Test:
- Login
- Registration
- CRUD operations
-
(Optional Enhancement)
- Deploy to cloud server (DigitalOcean / VPS)
- Use the domain name
Expected Output
Students should produce:
- WAR file
- Deployed application running on Tomcat
- Screenshots of the working system
📚 Suggested Readings
- Apache Tomcat Documentation https://tomcat.apache.org/
- Java Web Application Deployment Guide (Refer YT)
- WAR File Structure Explanation
- Java EE Deployment Descriptor Guide (Refer YT)