0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Webサーバーを作りながらJavaをマスターする 改訂版

Last updated at Posted at 2021-04-16

やってみて・・・

少し意味がわかったぐらい。あんまり深みにはまりすぎると問題なので・・・

TakeAway

以下の記事は読み込んでおこうと思う。
Pathsについて
https://www.baeldung.com/java-nio-2-path
名前付きグループについて
https://qiita.com/jnchito/items/cceb669cb06fc044f411

完了条件

改訂版がついてる場合

要旨

ものづくりしながらJavaをマスターする。

やること・やらないこと

やらないこと

Java8以降
業務の仕様
データベース関連

やること

サーバー

インプット

サーバー

リンク
https://github.com/todokr/simple-http-server
https://speakerdeck.com/todokr/xin-siihurokuraminkuyan-yu-falsexue-hifang-httpsahawozuo-tutexue-hu-java-scala-clojure
https://nowokay.hatenablog.com/entry/20160419/1461032474

アウトプット

・一旦端から動かしてみる。

内容

目次
・動きの確認 コード等
・コードを動かす。
・TakeAway

動きの確認 事前準備

スクリーンショット 2021-04-16 10.18.26.png
スクリーンショット 2021-04-16 10.23.36.png
python3 -m http.server

通信の中身の確認

HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/3.8.3
Date: Fri, 16 Apr 2021 02:43:07 GMT
Content-type: text/html
Content-Length: 1395
Last-Modified: Fri, 02 Apr 2021 03:28:36 GMT


<!--
  Copyright 2016 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  limitations under the License.
-->

<!-- referenced in: https://developers.google.com/web/tools/chrome-devtools/javascript -->

<!doctype html>
<html>
  <head>
    <title>Demo: Circle Ten </title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      h1 {
        font-size: 1.5em
      }
      input, button {
        min-width: 72px;
        min-height: 36px;
        border: 1px solid grey;
      }
      label, input, button {
        display: block;
      }
      input {
        margin-bottom: 1em;
      }
    </style>
  </head>
  <body>
    <h1>Demo: Demo: Circle Ten</h1>
    <label for="num1">Number 1</label>
    <input placeholder="Number 1" id="num1">
    <label for="num2">Number 2</label>
    <input placeholder="Number 2" id="num2">
    <button>Number 1 + (Number 1 * 0.9) * Number 2 </button>
    <p></p>	
    <script src="get-started.js"></script>
  </body>
</html>

分析

SimpleJavaHttpServer.java

Request.java

RequestParser.java

RequestHandler.java

Response.java

分析

Server

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?