Java Reference
In-Depth Information
L ISTING 16.6
Continued
// Get the Employee's Name from the request
out.println(“<b>Employee: </b>” +
request.getParameter(“employee”));
// Get the Employee's Title from the request
out.println(“<br><b>Title: </b>” +
request.getParameter(“title”));
%>
</td>
</tr>
</table>
L ISTING 16.7
MCPHome.jsp
<table>
<tr>
<td>
<img src=”mcplogo.gif”>
</td>
<td>
<%
// Get the Employee's Name from the request
out.println(“<b>Employee: </b>” +
request.getParameter(“employee”));
// Get the Employee's Title from the request
out.println(“<br><b>Title: </b>” +
request.getParameter(“title”));
%>
</td>
</tr>
</table>
After you have copied the JSPs and the two image files, sams.gif and mcplogo.gif , into the
< SERVER_ROOT >/djs/ directory, open your browser to the following URL:
http:// localhost/djs /UseForward.jsp?companyId=1
You will see an image similar to Figure 16.2.
Search WWH ::




Custom Search