Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows

JK1982 
Created at  

  7,041   0   0  

STEP 1. Install OpenJDK 17

https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-17 → select microsoft-jdk-17.0.10-windows-x64.msi → Install

 

STEP 2. Install Maven

  1. https://maven.apache.org/ → Download → apache-maven-3.9.6-bin.zip (or latest version) → unzip and move to C:/Program Files → You should remember the path like C:\Program Files\apache-maven-3.9.6 
  2. Now click on Start Menu and search “Edit the system environment variables” and open it → Advanced → Click New under User variables → Set variable like:
    Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows
    Then you will see the result like below:
    Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows
  3. Add MAVEN_HOME Directory in PATH Variable by adding \bin in the last as below
    Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows
  4. Verify if maven is correctly installed: Start → cmd + Enter → run mvn -version 
C:\Users\kurap>mvn -version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: C:\Program Files\apache-maven-3.9.6
Java version: 17.0.10, vendor: Microsoft, runtime: C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot
Default locale: en_US, platform encoding: MS949
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

 

STEP 3. Creating a Java Web project in VS Code by using Maven plugin

If you haven't install “Java Extension Pack”, do below steps

Run VS Code → File → Preferences → Extensions (Ctrl + Shift + X) → Type Project Manager for Java→ Install Project Manager for Java → Install

Run VS Code → File → Preferences → Extensions (Ctrl + Shift + X) → Type Extension Pack for Java→ Install Extension Pack for Java → Install

Run VS Code → File → Preferences → Extensions (Ctrl + Shift + X) → Type JSP Language Support→ Install JSP Language Support → Install

If you haven't install “Maven for Java”, do below steps

Run VS Code → File → Preferences → Extensions (Ctrl + Shift + X) → Type maven → Install Maven for Java → Install

Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows

 

STEP 4. Create a Maven Project

Create a Maven Project → maven-archetype-webapp → 1.4 → input group ID like com.foodbank  → input project name like ca_foodbank → create directory and Select Destination Folder 

Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows

As a result, ca_foodbank  will be created with the necessary files

 

Refernce:

 

STEP 5. How to run web service

https://tomcap.apache.org → Tomcat 10 → 32-bit/64-bit Windows Service Installer → Next → I Agree → + Host Manager + Examples → Set HTTP/1.1 Connector Port as 8080, Admin User Name (usually admin), Password → Next → Select Java Path (Usually installed under C:\Program Files\Microsoft\) → Next → Finish

Regarding Java Path, today I installed at C:\Program Files\Microsoft\jdk-17.0.10.7-hotspot based on the STEP 1

You can check your web server at https://127.0.0.1:8080 if everything goes fine.

 

 

STEP 6. JSP/Servlet Tutorial



Tags: Apache Tomcat 10 JSP Java Tomcat Share on Facebook Share on X

◀ PREVIOUS
Dataset of California Foodbanks

▶ NEXT
How do I replace content that based on the HTML UI Template

  Comments 0
SIMILAR POSTS

Java Servlet Example

(created at )

Java Tutorials associated with AP Computer Science A

(updated at )

Difference between Java and Javascript

(updated at )

Machine Learning Types and Programming Languages

(updated at )

Java Inner Classes

(updated at )

Java Polymorphism

(created at )

Java Inheritance (Subclass and Superclass)

(updated at )

Java Packages

(updated at )

Java Classes and Objects

(updated at )

Java Recursion

(updated at )

Java Scope

(updated at )

Java Methods

(updated at )

Java While Loop/Do While Loop/For Loop/For-Each Loop/Break/Continue

(updated at )

Java Switch Statements

(updated at )

Java Short Hand If...Else (Ternary Operator)

(updated at )

Java If ... Else

(updated at )

Java Math

(updated at )

Java Variables

(updated at )

Java Comments

(updated at )

The Print() Method

(updated at )

Java Syntax

(updated at )

Java Getting Started

(updated at )

What is Java?

(created at )

Challenge: One Code Problem Per Day

(created at )

OTHER POSTS IN THE SAME CATEGORY

Java Servlet Example

(created at )

How do I replace content that based on the HTML UI Template

(created at )

Dataset of California Foodbanks

(updated at )

Java Tutorials associated with AP Computer Science A

(updated at )

Java Inner Classes

(updated at )

Java Polymorphism

(created at )

Java Inheritance (Subclass and Superclass)

(updated at )

Java Packages

(updated at )

Java Abstract Classes and Methods

(updated at )

Java Classes and Objects

(updated at )

Java Recursion

(updated at )

Java Scope

(updated at )

Java Methods

(updated at )

Java Arrays

(updated at )

Java While Loop/Do While Loop/For Loop/For-Each Loop/Break/Continue

(updated at )

Java Switch Statements

(updated at )

Java Short Hand If...Else (Ternary Operator)

(updated at )

UPDATES

Harness vs. OpenClaw: Two Very Different "Agents"

(updated at )

Clean Python Environments: The Power of venv vs. Docker

(updated at )

What is Docker? Why is Docker also useful in a development environment?

(created at )

UIUC 2026-2027 Academic Calendar

(updated at )

How to Build Llama 3 AI Apps with Python: Setup & User Prompts

(updated at )

Open-Source LLMs: The AI Revolution

(updated at )

Resume 2.0: Leveling Up for My First Software Gig

(created at )

Not everyone will understand what this man just did

(created at )

UIUC Dorm Guide: Find Your Perfect Fit !!

(updated at )

Unpacking IU's Shopper

(created at )

Jackie Chan's Police Story: The Action Masterpiece

(updated at )

The IVE Story: Identity, 'I AM' Charts, and Influence

(updated at )

Tech Visionaries who graduated at UIUC - You are the Next Turn

(updated at )

Open Databases for Sex Crime Occurrences in the U.S.

(updated at )

Automatically copy text to the clipboard when dragging the mouse in the Cursor

(updated at )

My First Day at University of Illinois-Urvana Champaign

(updated at )

Sand, Sea, and a Splash of Fun at Newport Beach: A Family Adventure

(updated at )

Sun, Rocks, and Adventure: A Day at Joshua Tree National Park

(updated at )

Sipping the Stars: My Starbucks Adventure

(updated at )

Exciting explore at Sequoia National Park

(updated at )

My Life Shot at Death Valley

(updated at )

Ip Man fights with Muay Thai Master

(created at )

Mad Clown - Don't Die

(created at )

How to get Student Enrollment and Degree Verification at UIUC

(updated at )

LAX Thanksgiving Rush: A Joyful Reunion

(updated at )

ZO ZAZZ(조째즈) - Don`t you know (모르시나요) (PROD.ROCOBERRY)

(updated at )

FISHINGIRLS Unleashes Energetic EP 'Funiverse' Featuring Signature Track 'Fishing King'

(updated at )

10CM - To Reach You (너에게 닿기를)

(updated at )

Feeling weak? Transform yourself at the UIUC ARC!

(updated at )

BOYNEXTDOOR - If I Say I Love You

(updated at )

The Future of Software Engineer - AI Engineering

(updated at )

G Dragon x Taeyang (Eyes Nose Lips, Power, Home Sweet Home, GOOD BOY) - LE GALA PIÈCES JAUNES 2025

(updated at )

Lie - Legend song by BIGBANG

(updated at )

Why ROLLBACK is useful when you work with Google Gemini CLI?

(created at )

Reimbursement after Vaccination at McKinley Health Center

(created at )

Gemini CLI makes a Magic! Time to speed up your app development with Google Gemini CLI!

(created at )

Common Questions from UIUC school life in terms of CS Program

(created at )

UIUC Immunization Compliance

(created at )

LEE CHANHYUK's songs really resonate with my soul - Time Stop! Vivid LaLa Love, Eve, Endangered Love ...

(created at )

LEE CHANHYUK - Endangered Love (멸종위기사랑)

(created at )

Cupid (OT4/Twin Ver.) - LIVE IN STUDIO | FIFTY FIFTY (피프티피프티)

(created at )

Common methods to improve coding skills

(created at )

US National Holiday in 2026

(created at )

BABYMONSTER “WE GO UP” Band LIVE [it's Live] K-POP live music show

(created at )

BLACKPINK - ‘Shut Down’ Live at Coachella 2023

(created at )

JENNIE - like JENNIE - One of Hot K-POP in 2025

(created at )

BABYMONSTER(베이비몬스터) - DRIP + HOT SOURCE + SHEESH

(created at )

Common Naming Format in Software Development

(created at )

In a life where I don't want to spill even a single sip of champagne - LEE CHANHYUK - Panorama(파노라마)

(created at )

Countries with more males and females - what about UIUC?

(created at )