coverSheet.jsp
<%@ page contentType="text/html; charset=euc-jp" %>
<%@ page language="java" %>
<%!
// Helper method to deal with non-initialized attributes.
private String getValue( Object attribute ) {
if ( attribute != null ) {
return attribute.toString();
} else {
return "";
}
}
%>
<html>
<head>
<title>PSG FAX 送付状ジェネレータ</title>
</head>
<h1>FAX 送付状ジェネレータ</h1>
<p>
このサンプルでは、宣言 (<%! ... %>)、スクリプトレット (<%
... %>)、表現 (<%= ... %>) を使用して、Pajato Systems Group 社の FAX 送付状を生成します。
<form action="generateCoverSheet.jsp">
<table>
<tr>
<th align="right">送信先:</th>
<td><input type="text" name="target"
value='<%= getValue( session.getAttribute( "target" ) ) %>'>
</td>
</tr>
<tr>
<th align="right">FAX 番号:</th>
<td><input type="text" name="faxNumber"
value='<%= getValue( session.getAttribute( "faxNumber" ) ) %>'>
</td>
</tr>
<tr>
<th align="right">電話番号:</th>
<td><input type='text' name="phoneNumber"
value='<%= getValue( session.getAttribute( "phoneNumber" ) ) %>'>
</td>
</tr>
<tr>
<th align="right">件名:</th>
<td><input type='text' name="subject"
value='<%= getValue( session.getAttribute( "subject" ) ) %>'>
</td>
</tr>
<tr>
<th align="right">送付枚数 (本状を含む):</th>
<td><input type="text" name="sheetCount"
value='<%= getValue( session.getAttribute( "sheetCount" ) ) %>'>
</td>
</tr>
<tr>
<th align="right">メッセージ:</th>
<td>
<textarea name="message" cols=60 rows=8
value='<%= getValue( session.getAttribute( "message" ) ) %>'>
</textarea>
</td>
</tr>
</table>
<p>
<center>
<input type="submit" name="generateInvoice" value="送付状の生成">
</center>
</form>
</html>