Java Reference
In-Depth Information
The second JSP will include the header.jsp in the top row of its table and pass it the
employee's name and title, using the <jsp:param> standard action. It will then include some
static text indicating the employee's current statistics. Listing 16.4 contains the source code for
your second JSP.
L ISTING 16.4
EmployeeInfo.jsp
<%@ page errorPage=”errorpage.jsp” %>
<html>
<head>
<title>Employee Information</title>
</head>
<body>
<table width=”100%” cellspacing=”0”>
<tr>
<td>
<jsp:include page=”header.jsp” flush=”true”>
<jsp:param name=”employee” value=”Bob”/>
<jsp:param name=”title” value=”Engineer”/>
</jsp:include>
</td>
</tr>
<tr bgcolor=”lightgrey”>
<td>
Years of Employment:
</td>
<td>
7
</td>
</tr>
<tr>
<td>
Supervisor:
</td>
<td>
Joe
</td>
</tr>
<tr bgcolor=”lightgrey”>
<td>
Salary:
</td>
<td>
$93,000
</td>
</tr>
Search WWH ::




Custom Search