Skip to content

Topic 8: Packaging and Deployment

Zhamri Che Ani edited this page Apr 11, 2026 · 1 revision

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:

  1. Explain the purpose of packaging in enterprise applications
  2. Identify different Java EE modules (Web, EJB)
  3. Package a web application into a WAR file
  4. Deploy a web application to a server (e.g., Apache Tomcat)
  5. Understand deployment descriptors and configuration

📌 Topics to Cover

  1. Packaging Concepts
    • Why is packaging needed
    • Structure of a web application
  2. Java EE Application Packaging
    • Web module (WAR file)
    • EJB module (concept only)
  3. Web Application Structure
    • WEB-INF folder
    • web.xml (deployment descriptor)
  4. Deployment Descriptors
    • Purpose of web.xml
    • Servlet mapping
  5. Deployment Tools
    • Apache Tomcat
    • IDE deployment (IntelliJ / Eclipse / VS Code)
  6. 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.

  1. Prepare Project Ensure system is complete:

    • Servlet
    • JSP
    • JavaBean
    • JDBC
  2. Package Application

    • Convert project into a WAR file
    • Example: student-system.war
  3. Deploy to Server (Tomcat)

    • Copy WAR file into: /webapps/
    • Start Tomcat server
  4. Run Application Access system via browser:

http://localhost:8080/student-system
  1. Verify Functionality Test:

    • Login
    • Registration
    • CRUD operations
  2. (Optional Enhancement)

    • Deploy to cloud server (DigitalOcean / VPS)
    • Use the domain name

Expected Output

Students should produce:

  1. WAR file
  2. Deployed application running on Tomcat
  3. Screenshots of the working system

📚 Suggested Readings

  1. Apache Tomcat Documentation https://tomcat.apache.org/
  2. Java Web Application Deployment Guide (Refer YT)
  3. WAR File Structure Explanation
  4. Java EE Deployment Descriptor Guide (Refer YT)

Clone this wiki locally