JSP + Eclipse + Jetty development environment construction that even Java beginners can do

I was forced to do some web development in Java because of my work. For beginners, it was difficult to start with understanding the words, but I managed to do it: sweat_smile: It takes about half a day to a day, including the survey. Since this is a procedure that beginners are doing, there may be many inadequacies.

In an attempt to develop SAP-related, I have recorded the JDK installation in the following article (other than the JDK).

--Installation of JDK: Building SAP system connection environment using JCo to PC that even Java beginners can do

Environment construction procedure

1. Eclipse download

Download the installation file from the Official Page Download Site. Run the installation file.

Select "Eclipse IDE for Java EE Developers". I was at a loss between "Eclipse IDE for Java EE Developers" and "Eclipse IDE for Java EE Developers", but the article ["Eclipse for Web development with Java, choose Eclipse IDE for Java EE Developers"](http Judgment by looking at: //javatechnology.net/tool/eclipse-ee-developers/) 10.EclipseInstall01.JPG

Select the installation destination. 10.EclipseInstall02.JPG

Acceptance of license. 10.EclipseInstall03.JPG

I pressed LAUNCH and it failed once, but when I re-run it worked. 10.EclipseInstall04.JPG

Set Workspace as the default. 10.EclipseInstall05.JPG

Introduction of Jetty plugin

Select Help-> Eclipse Marketplace from the menu.

Install Eclipse Jetty 3.9.0 and Run-Jetty-Run 1.3.5-nightly (license screen etc. omitted). I rebooted after installing both. 20.JettyInstall01.JPG

JSP creation / confirmation procedure

1. Create a project

Right-click in Project Explorer and select New-> Project. 30.CreateJSP01.JPG

Select Dynamic Web Project. 30.CreateJSP02.JPG

Enter the Project name and Finish. In the screenshot, the item "Target runtime" is "None", but if you enter "J2EE Preview", a warning "The superclass" javax.servlet.http.HttpServlet "was will appear later. "not found on the Java Build Path" disappears. </ sup> 30.CreateJSP03.JPG

2. JSP registration

Right-click in the "Web Content" folder of Project Explorer and select New-> Other. 30.CreateJSP04.JPG

Select JSP File. 30.CreateJSP05.JPG

Enter the file name and finish. 30.CreateJSP06.JPG

The JSP file is sourced like this. Described to output the date and time in the body tag.

index.jsp


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%= new java.util.Date() %>
</body>
</html>

3. Launch Jetty

Right-click on the created JSP file and select Run As-> 2 Run Jetty. 30.CreateJSP08.JPG

4. Access with a browser

Open the JSP in your browser. This time, the port is 8080 by default and the project name is HelloWorld, so open it with the following URL (since the file name is "index.jsp", HelloWorld and below are not specified). http://localhost:8080/HelloWorld/

The date and time are displayed like the screen! 30.CreateJSP09.JPG

Recommended Posts

JSP + Eclipse + Jetty development environment construction that even Java beginners can do
[Even beginners can do it! ] How to install Eclipse on Windows 10 (Java environment construction)
java development environment construction
Building an SAP system connection environment using JCo to a PC that even Java beginners can do
[Even beginners can do it! ] How to create Java environment on Windows 10 (JDK14.0.1)
Java development environment (Mac, Eclipse)
Android environment construction that even monkeys can understand [React Native]
[Eclipse Java] Development environment setting memo
[ev3 × Java] leJOS development environment construction (Eclipse on Mac OSX / bluetooth)
[Processing x Java] Construction of development environment
Java development environment construction memo on Mac
Play Framework 2.6 (Java) environment construction in Eclipse
Spring Boot + Docker Java development environment construction
Scala's Implicit that even Java shops can understand
[Java] Environment construction
Java environment construction
Java development environment
Java development environment construction (Mac + Pleiades All in One Eclipse 4.7 + Spring Boot + Gradle (Buildship))
Java development environment construction on Mac-JDK Install (2020 preservation version)
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
[Even beginners can do it! ] How to write Javadoc
"Inheritance" that even beginners of object-oriented programming can understand
[Java] Environment construction procedure for developing struts 1.3 with Eclipse
[Environment construction] Build a Java development environment with VS Code!
Polymorphism that even beginners of object-oriented programming can understand
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
[Environment construction] Eclipse installation
Java development environment memo
Docker × Java Building a development environment that is too simple
Web application development environment construction in Java (for inexperienced people)
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
Java web application development environment construction with VS Code (struts2)
Create a Java and JavaScript team development environment (gradle environment construction)
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
[Eclipse] Flow of introduction as a Java development environment (I investigated various things at that time)
Rails6 development environment construction [Mac]
JavaFX environment construction in Java 13
AtCoder Challenge Environment Construction (Java 8)
First Java development in Eclipse
If you want to change the Java development environment from Eclipse
Let me do VS Code Remote Development + Java development in Proxy environment
[Eclipse] 5 carefully selected shortcuts that even beginners should remember first [Mac]
Introduction to Java that can be understood even with Krillin (Part 1)