invoice1.jsp

<%@ page contentType="text/html; charset=euc-jp" %>
<!-- 
  Copyright 2001, Pajato Systems Group
  Copyright 2001, Allaire Corporation
-->

<!-- Declare the use of Java. -->
<%@ page language="java" %>

<html>
  <head>
    <title>PSG 請求書ジェネレータ - バージョン 1: サーブレットなし</title>
  </head>

  <h1>シンプルな請求書ジェネレータ</h1>

  <p>

  このサンプルでは、スクリプトレット (&lt;% ... %&gt;) および式 (&lt;%= ... %&gt;) を通して、ピュアな Java を使用した請求書が生成されます。

  <form action="generateInvoice1.jsp">
    <table>
      <tr>
        <td align="right">発注元会社の選択:</td>
        <td align="left">
          <select name="companySelector">

            <!-- The following generates a list of possible choices. -->

            <!-- Get a list of strings representing companies. -->
            <% String[] companies = {"Allaire"}; %>

            <!-- Loop through each company to generate a choice entry. -->
            <% for (int i = 0; i < companies.length; i++) { %>

              <!-- Make the choice entry simply be the company name. -->
              <option value="<%= companies[i] %>"><%= companies[i] %></option>

            <% } %>

          </select>
        </td>
      </tr>
      <tr>
        <td align="right">週の選択 (週の終わりの日付):</td>
        <td align="left">
          <select name="weekSelector">

            <!-- Generate a list of weeks -->
            <% String[] weeks = {"12/03/2000", "12/10/2000", "12/17/2000",
                                 "12/24/2000", "12/31/2000"}; %>

            <!-- Loop through each week to generate a choice entry. -->
            <% for (int weekIndex = 0; weekIndex < weeks.length; weekIndex++) { %>
              <option value="<%= weeks[weekIndex] %>"><%= weeks[weekIndex] %></option>
            <% } %>

          </select>
        </td>
      </tr>
      <tr>
        <td align="right">実働時間:</td>
        <td><input type="text" name="invoiceDate"></td>
      </tr>
      <tr><td align="right">時間:</td></tr>
      <tr><td align="right">月: </td><td><input type="text" name="monHours"></td></tr>
      <tr><td align="right">火: </td><td><input type="text" name="tueHours"></td></tr>
      <tr><td align="right">水: </td><td><input type="text" name="wedHours"></td></tr>
      <tr><td align="right">木: </td><td><input type="text" name="thuHours"></td></tr>
      <tr><td align="right">金: </td><td><input type="text" name="friHours"></td></tr>
      <tr><td align="right">土: </td><td><input type="text" name="satHours"></td></tr>
      <tr><td align="right">日: </td><td><input type="text" name="sunHours"></td></tr>
    </table>

    <p>
    <center>
      <input type="submit" name="generateInvoice" value="請求書の生成">
    </center>

  </form>

</html>