JSP.ZIP

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

created at Jan 28, 2024   1,255  
STEP 1. Install OpenJDK 17https: / / learn.microsoft.com / en-us / java / openjdk / download#openjdk-17 → select microsoft-jdk-17.0.10-windows-x64.msi → Install STEP 2. Install Mavenhttps: / / maven.apache.org / → Download → apache-maven-3.9.6-bin.z...
Creating a simple Java Servlet (Web Server Page) with Apache Maven on Microsoft Windows





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

JK1612 
Created at Jan 28, 2024 15:26:18 
  1,257   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
OTHER POSTS IN THE SAME CATEGORY

Java Servlet Example

(created at Feb 19, 2024)

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

(created at Feb 12, 2024)

Dataset of California Foodbanks

(updated at Feb 12, 2024)

Java Tutorials associated with AP Computer Science A

(updated at Jun 15, 2024)

Java Inner Classes

(updated at May 10, 2024)

Java Polymorphism

(created at Jul 18, 2023)

Java Inheritance (Subclass and Superclass)

(updated at May 10, 2024)

Java Packages

(updated at May 10, 2024)

Java Abstract Classes and Methods

(updated at Jan 02, 2024)

Java Classes and Objects

(updated at May 10, 2024)

Java Recursion

(updated at May 10, 2024)

Java Scope

(updated at May 10, 2024)

Java Methods

(updated at May 10, 2024)

Java Arrays

(updated at May 13, 2024)

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

(updated at May 13, 2024)

Java Switch Statements

(updated at May 15, 2024)

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

(updated at May 15, 2024)

UPDATES

Life Quotes from Google CTO Will Grannis emphasizes the importance of data and the problem definition

(updated at Dec 17, 2024)

Life Quotes from Netflix CTO Elizabeth Stone in 2023

(updated at Dec 17, 2024)

Exploring UC Irvine (aka UCI) - School and its Majors

(updated at Dec 13, 2024)

Understanding Rose-Hulman Institute of Technology

(updated at Dec 13, 2024)

Chilling Acrobatic Taekwondo! The Birth of a Poomsae Prodigy - Byeon Jae-yeong Wins 1st Place at the Hong Kong World Poomsae Championships

(created at Dec 12, 2024)

IU's breathtakingly beautiful "eight" live performance, captivating the hearts of the audience with her dazzling vocals

(created at Dec 10, 2024)

Navigation for UMass Amherst (aka University of Massachusetts Amherst) - Campus Life and Underground Majors

(updated at Dec 10, 2024)

Exploring UC San Diego (aka UCSD) - School and its Majors

(updated at Dec 10, 2024)

How to access websites blocked by ESNI and ECH settings with Firefox!

(updated at Nov 29, 2024)

[#2024MAMA] G-DRAGON - HOME SWEET HOME (feat. Taeyang, Daesung) | Mnet 241123

(updated at Nov 27, 2024)

Eveything you tell HR is confidential

(updated at Nov 27, 2024)

The hippie perm of NewJeans' Danielle 

(updated at Nov 23, 2024)

LoL Worldcup - Worlds 2024 Finals Opening Ceremony Presented by Mastercard ft. Linkin Park, Ashnikko and More!

(created at Nov 18, 2024)

Danielle was featured on the UK Fashion Pop Magazine cover

(updated at Nov 15, 2024)

IU Photos from her family trip

(updated at Nov 09, 2024)

Men vs. Women Taekwondo Sparring - Beautiful Taekwondo Star Tammy's Dazzling Roundhouse Kicks

(updated at Nov 09, 2024)

Legendary Taekwondo Match of the Korean National Sports Festival in High School Division

(updated at Nov 09, 2024)

Legendary Taekwondo 540 degree Kick - Champion Hyun-goo Noh

(created at Nov 09, 2024)

The difference between Equation and Formula

(created at Nov 08, 2024)

Lengendary Turkish Taekwondo player Tazegul at 2015 WTF World Taekwondo Championships

(updated at Nov 08, 2024)

World Rank #2 - Turkey TKD Legend Servet Tazegül

(created at Nov 07, 2024)

Irvine Restaurant American-Style Vietnamese Food Brodard (ft. Ultimate Spring Roll)

(updated at Nov 03, 2024)

Block unwanted URLs for comfortable web browsing with Chrome Addon - URL Blocker

(updated at Nov 01, 2024)

The Gigant Cowboys of Virginia City, Nevada 1889 - AI Generated Photos

(updated at Oct 28, 2024)

Sushi Koto: The "Ohtani" Sushi Spot in Irvine

(created at Oct 26, 2024)

Modern Web Indexing Technology - IndexNow

(updated at Oct 24, 2024)

Key Differences in Gen Z/Alpha/Zalpha based on Upbringing and Life Experiences

(updated at Oct 22, 2024)

Zalpha Generation: A New Term for the Children of Gen Z and Millennials

(updated at Oct 22, 2024)

Zalpha: A Global Trend, Not Just a Distant Concept

(updated at Oct 22, 2024)

The Generation Corona (+ Gen Z) is grappling with how to communicate and live alongside Gen Alpha

(updated at Oct 21, 2024)

Porto's Bakery in Buena Park: A Review from Irvine

(created at Oct 20, 2024)

Starship, Super Heavy, Successful Ground Landing

(updated at Oct 19, 2024)

AI Generated One-Punch Man with old school style TV shows

(updated at Oct 15, 2024)

One-Punch Man Analysis: The Bald Cape Hero

(updated at Oct 15, 2024)

Why One-Punch Man is a Great Action Anime?

(updated at Oct 15, 2024)

The War of Dogs and Cats - AI-Generated Video by AlgoContent

(updated at Oct 15, 2024)

Dreamy indie band Room402's song "Like the Moon in the Daytime" with AI-generated video

(updated at Oct 15, 2024)

One-Punch Man's Saitama: Motivational Quotes and the Hero's Story

(updated at Oct 13, 2024)

Cream Pan: A Must-Visit Japanese Bakery in Fountain Valley

(created at Oct 13, 2024)

NewJeans - Chicago Live at Lollapalooza 2023

(updated at Oct 12, 2024)

One-Punch Man: Saitama's Promotion Journey and the Final Goal as a Hero

(updated at Oct 12, 2024)

One-Punch Man Combat Power Rankings

(created at Oct 12, 2024)

Difference in HEAD and GET for HTTP Request - why HEAD Request could be used for DDoS Attack?

(updated at Oct 11, 2024)

AI Generated Sailor Moon Video - In the name of justice, I will not forgive you!

(updated at Oct 11, 2024)

Snack that makes my mouth happy when winter comes from the U.S - Hot Pockets

(updated at Oct 11, 2024)

One-Punch Man Crafted by AI - Witness the Limitless Power of Sora AI

(updated at Oct 11, 2024)

My chrome browser is annoying me by Language - How do I change the default language?

(updated at Oct 11, 2024)

AI-Generated Berserk: A Majestic Sight

(updated at Oct 11, 2024)

Global Electronic Medicine Trends and Market Outlook 

(updated at Oct 09, 2024)

What is Google Analytics?

(updated at Oct 09, 2024)