Understanding the MVC framework with server-side Java 1/4 View

378333-65-635622856628312282_338x600_thumb.jpg

things to do

Let's create a website using the framework of the subject Breakdown of all 4 times ** 1. Create a front page with View jsp **

Premise

--Eclipse installed --DB2 installed (required for 4th time)

procedure

Create jsp

  1. Right-click on Eclipse's Project Explorer → New → Create Dynamic Web Project → Marketed Runtime: Select tomcat7 → Done createProject.png

  2. Right-click WebContent → New → Create jsp file (image is after creation) jsp作成.PNG

  3. Create a text submission form ↓

Top.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>Top</title>
<h1>top</h1>
</head>
<body>

<form action="(Destination)" method="post">   <!--Declaration to send ↓ information in post-->
	<input type="text" name="keyword">   <!--Search keyword input field-->
	<input type="submit" value="Search"> <!--Keyword send button-->
</from>

</body>
</html>

Checking the operation of jsp

  1. Set up a virtual server that runs jsp and java (it's ok if you do it only the first time). Right click in Server view → New → Server

setServer.png     2. Select the server version. Let's set it to 7 this time. Then click Next * If it doesn't work, use java8 tomcat.PNG

3. Place the project you want to run. After adding, click Finish projectAdd.png     4. Click the ↓ Run button → Run on the server → Click Finish run.PNG

  1. If it looks like this, it's ok. If you have the time, it may be fun to play around with css. minimum.PNG

Understanding the MVC framework with server-side Java 2/4 Model http://qiita.com/kyogom/items/e31f3fa0cbb2fff70d26

Recommended Posts

Understanding the MVC framework with server-side Java 1/4 View
Understanding the MVC framework with server-side Java 3/4 Controller
Understanding the MVC framework with server-side Java 2/4 Model
Get started with serverless Java with the lightweight framework Micronaut!
[Java] [Play Framework] Until the project is started with Gradle
Consideration on the 2017 Java Persistence Framework (1)
I tried the Java framework "Quarkus"
Follow the link with Selenium (Java)
java framework
Console input in Java (understanding the mechanism)
Try using the Wii remote with Java
[Java] Get the date with the LocalDateTime class
Be careful with requests and responses when using the Serverless Framework in Java
JAVA: jar, aar, view the contents of the file
[LeJOS] Let's control the EV3 motor with Java
What is the Java Servlet / JSP MVC model?
[Java] Set the time from the browser with jsoup
How to use Java framework with AWS Lambda! ??
Calculate the similarity score of strings with JAVA
Find the Fibonacci number with the Fork / Join Framework
Java starting with JShell-A peek into the Java world
Java framework comparison
[Java] Collection framework
Trace the SQL executed with the application Insights java agent
[wip] Server-side development comfortably and freely with the server
[Tutorial] Download Eclipse → Run the application with Java (Pleiades)
CI the architecture of Java / Kotlin applications with ArchUnit
How to deploy Java to AWS Lambda with Serverless Framework
Monitor the internal state of Java programs with Kubernetes
Check the behavior of Java Intrinsic Locks with bpftrace
[Java] Get the date 10 days later with the Calendar class
[Java] Get the file path in the folder with List
[Java] When writing the source ... A memorandum of understanding ①
HTTPS connection with Java to the self-signed certificate server
[LeJOS] Let's remotely control the EV3 motor with Java
Prepare the environment for java11 and javaFx with Ubuntu 18.4
A survey of the Kubernetes native Java framework Quarkus
The story of making dto, dao-like with java, sqlite
Java desktop with the same front end as the WEB.
Replace only part of the URL host with java