Java Reference
In-Depth Information
L ISTING 22.5
Continued
<td width=”75”><%@ include file=”navigation.jsp” %></td>
<td valign=”top” >
<div align=”left”>
<table border=”1” cellpadding=”0” cellspacing=”2” width=”500”>
<tr>
<th>Symbol</th>
<th>Price</th>
<th>Bid</th>
<th>Ask</th>
</tr>
<tr>
<td>
<div align=”center”><%=request.getAttribute(“symbol”) %></div>
</td>
<td>
<div align=”center”><%=request.getAttribute(“price”) %></div>
</td>
<td>
<div align=”center”><%=request.getAttribute(“bid”) %></div>
</td>
<td>
<div align=”center”><%=request.getAttribute(“ask”) %></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
Buy/Sell View
The next JSP that we will look at serves as the view for both the Buy and Sell services. It con-
tains an HTML form that lets you choose to either buy or sell a stock and specify what price
you are bidding or asking. The choice you make to either buy or sell will determine which ser-
vice you execute. An image of the Buy/Sell View is in Figure 22.6.
The source for the Buy/Sell View is in Listing 22.6.
Search WWH ::




Custom Search