invoice2.jsp

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

<!-- Provide an error page to handle exceptions. -->
<!-- We do not intend to write perfect code. :-) -->
<%@ page errorPage="errors.jsp" %>

<%@ page import="allaire.taglib.*" %>
<%@ taglib uri="jruntags" prefix="jrun" %>

<jsp:useBean
    id="invoiceBean" scope="application"
    class="allaire.samples.invoice.InvoiceBean">
</jsp:useBean>

<html>

  <head>
    <title>PSG 請求書ジェネレータ - バージョン 2: Java Bean および JRun カスタム タグ ライブラリの使用</title>
  </head>

  <body>

    <!-- Use a conditional custom tag to select between the setup -->
    <!-- part and the generate part.  The default operation will  -->
    <!-- be setup.  Only when the User selects the `Generate'     -->
    <!-- submit button will setup be disabled and generate        -->
    <!-- be enabled.                                              -->

    <form name="invoiceForm" method="POST">

      <!-- Use a scriptlet to conditionally load the invoice      -->
      <!-- generation page, otherwise load the invoice setup      -->
      <!-- page.                                                  -->

      <% boolean condition =
           "GENERATE".equals( request.getParameter( "operation" ) ); %>
      <% if ( condition ) { %>
	<%@ include file="invoice2-generate.jsp" %>
      <% } else { %>
        <%@ include file="invoice2-setup.jsp" %>
      <% } %>

      <!-- The hidden field `operation' controls the behavior of  -->
      <!-- page.                                                  -->
      <input type="hidden" name="operation" value="SETUP">

    </form>

  </body>

</html>