167 lines
7.0 KiB
HTML
167 lines
7.0 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Example: JSPReportProcessor sample JSP file" />
|
||
|
<meta name="abstract" content="" />
|
||
|
<meta name="description" content="" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="jspcusttablejsp" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Example: JSPReportProcessor sample JSP file</title>
|
||
|
</head>
|
||
|
<body id="jspcusttablejsp"><a name="jspcusttablejsp"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Example: JSPReportProcessor sample JSP file</h1>
|
||
|
<div><p></p>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> Read the <a href="codedisclaimer.htm#codedisclaimer">Code
|
||
|
example disclaimer</a> for important legal information.</div>
|
||
|
<pre><?xml version="1.0"?>
|
||
|
|
||
|
<!--
|
||
|
Copyright (c) 1999 The Apache Software Foundation. All rights reserved.
|
||
|
-->
|
||
|
|
||
|
<%@ page session="false"%>
|
||
|
<%@ page language="java" contentType="text/html" %>
|
||
|
<%@ page import="java.lang.*" %>
|
||
|
<%@ page import="java.util.*" %>
|
||
|
|
||
|
|
||
|
<%-- <jsp:useBean id='cust_table' scope='page' class='table.JSPcust_table'/> --%>
|
||
|
|
||
|
<%!
|
||
|
String[][] cust_data = new String [4][5];
|
||
|
|
||
|
public void jspInit()
|
||
|
{
|
||
|
//cust_record_field [][] cust_data;
|
||
|
// cust_record holds customer name, customer address, customer city, customer state,
|
||
|
// customer zip
|
||
|
|
||
|
|
||
|
String [] cust_record_1 = {"IBM","3602 4th St","Rochester","Mn","55901"};
|
||
|
String [] cust_record_2 = {"HP","400 2nd","Springfield","Mo","33559"};
|
||
|
String [] cust_record_3 = {"Wolzack","34 Hwy 52N","Lansing","Or","67895"};
|
||
|
String [] cust_record_4 = {"Siems","343 60th","Salem","Tx","12345"};
|
||
|
|
||
|
cust_data[0] = cust_record_1;
|
||
|
cust_data[1] = cust_record_2;
|
||
|
cust_data[2] = cust_record_3;
|
||
|
cust_data[3] = cust_record_4;
|
||
|
}
|
||
|
%>
|
||
|
|
||
|
<!-- First test of parse and compose. -->
|
||
|
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||
|
<fo:layout-master-set>
|
||
|
<fo:simple-page-master master-name="theMaster" >
|
||
|
<fo:region-body region-name="theRegion" margin-left=".2in"/>
|
||
|
</fo:simple-page-master>
|
||
|
<fo:page-sequence-master master-name="theMaster">
|
||
|
<fo:single-page-master-reference master-name="thePage"/>
|
||
|
</fo:page-sequence-master>
|
||
|
</fo:layout-master-set>
|
||
|
<fo:page-sequence master-name="theMaster">
|
||
|
<fo:flow flow-name="theRegion">
|
||
|
<fo:block>
|
||
|
<fo:block text-align="center"> NORCAP </fo:block>
|
||
|
<fo:block space-before=".2in" text-align="center">PAN PACIFIC HOTEL IN SAN FRANCISCO </fo:block>
|
||
|
<fo:block text-align="center"> FRIDAY, DECEMBER 8-9, 2000 </fo:block>
|
||
|
</fo:block>
|
||
|
<fo:block space-before=".5in" font-size="8pt">
|
||
|
<fo:table table-layout="fixed">
|
||
|
<fo:table-column column-width="3in"/>
|
||
|
<fo:table-column column-width="3in"/>
|
||
|
<fo:table-column column-width="3in"/>
|
||
|
<fo:table-column column-width="3in"/>
|
||
|
<fo:table-column column-width="3in"/>
|
||
|
<fo:table-body>
|
||
|
<fo:table-row>
|
||
|
<fo:table-cell column-number="1">
|
||
|
<fo:block border-bottom-style="solid">NAME</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="2">
|
||
|
<fo:block border-bottom-style="solid">ADDRESS</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="3">
|
||
|
<fo:block border-bottom-style="solid">CITY</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="4">
|
||
|
<fo:block border-bottom-style="solid">STATE</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="5">
|
||
|
<fo:block border-bottom-style="solid">ZIP CODE</fo:block>
|
||
|
</fo:table-cell>
|
||
|
</fo:table-row>
|
||
|
|
||
|
<%
|
||
|
// add row to table
|
||
|
for(int i = 0; i <= 3; i++)
|
||
|
{
|
||
|
String[] _array = cust_data[i];
|
||
|
%>
|
||
|
|
||
|
<fo:table-row>
|
||
|
<fo:table-cell column-number="1">
|
||
|
<fo:block space-before=".1in">
|
||
|
<% if(_array[0].equals("IBM")) { %>
|
||
|
<fo:inline background-color="blue">
|
||
|
<% out.print(_array[0]); %>
|
||
|
</fo:inline>
|
||
|
<% } else { %>
|
||
|
<% out.print(_array[0]); %>
|
||
|
<% } %>
|
||
|
</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="2">
|
||
|
<fo:block space-before=".1in">
|
||
|
<% out.print(_array[1]); %>
|
||
|
</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="3">
|
||
|
<fo:block space-before=".1in">
|
||
|
<% out.print(_array[2]); %>
|
||
|
</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="4">
|
||
|
<fo:block space-before=".1in">
|
||
|
<% out.print(_array[3]); %>
|
||
|
</fo:block>
|
||
|
</fo:table-cell>
|
||
|
<fo:table-cell column-number="5">
|
||
|
<fo:block space-before=".1in">
|
||
|
<% out.print(_array[4]); %>
|
||
|
</fo:block>
|
||
|
</fo:table-cell>
|
||
|
</fo:table-row>
|
||
|
|
||
|
<%
|
||
|
} // end row while
|
||
|
%>
|
||
|
|
||
|
</fo:table-body>
|
||
|
</fo:table>
|
||
|
</fo:block>
|
||
|
</fo:flow>
|
||
|
</fo:page-sequence>
|
||
|
</fo:root></pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|