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?

JSPの基礎

Posted at

JPT

Java Server Pages
HTMLのなかにJavaコードを埋め込めるWebページの仕組み

何のための仕組み?
動的なWebページを作るため
ユーザー、データベースによって内容が変わるページなど
ex)ログイン画面、商品検索、会員情報の表示など

書き方
htmlに以下のようなjavaコードを埋め込む

<html>
  <body>
    <h1>こんにちは、<%= request.getParameter("name") %>さん!</h1>
  </body>
</html>

ユーザーが
?name=Tiffany
と入力すると、
「こんにちは、Tiffanyさん!」と表示される

JSP特徴*
①Javaで動的な処理が処理できる
 DB連携や条件分岐が可能
②HTMLとJavaを混ぜて書ける
 1つのファイルにまとめれる
③サーバー側で処理
 ブラウザにはHTMLとして送信される

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?