Skip to content

Instantly share code, notes, and snippets.

@Cartman0
Last active December 1, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cartman0/f6a38bfe3cddbc865a13 to your computer and use it in GitHub Desktop.
Save Cartman0/f6a38bfe3cddbc865a13 to your computer and use it in GitHub Desktop.
jspのサンプル
<%-- Pageディレクティブ --%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
ArrayList<String> list = new ArrayList<String>();
list.add("はしくれ");
list.add("エンジニア");
list.add("もどきの");
list.add("メモ");
%>
<h1>
<% for(int i = 0; i<list.size(); i++){ %>
<%-- スクリプト式 --%>
<%= list.get(i) %>
<% } %>
</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment