Next you should enter a symbol into the Get Quote form. For this limited application there are
currently only four stocks to choose from—YHOO, SUNW, AMZN, and MSFT. Figure 22.5
shows the result of entering YHOO .
Now click the Buy link and enter YHOO in the Symbol field, select the Buy button, and enter a
price greater than the Ask price returned from the GetQuote service. You will be redirected to
the index.jsp page. Now get the updated quote for YHOO using the same process as you did
before. You should see a page reflecting a new price and the Ask price should be 0.
To use the Sell service, make sure there is a Bid for the stock you want to buy and enter a Sell
price that is lower.
In this chapter we covered a very simple stock trading application that further validates how
you can leverage your server-side implementation of the MVC. At this point you should feel
comfortable with how you can combine servlets and JSPs using the MVC. You should also
have a good understanding of the power and flexibility of a server-side implementation of the