Section 18.11. Exercises


18.11. Exercises

1.

Modify the BudgetPro servlet so that it responds differently for the doGet() and doPost() methods. Have doPost() continue to work as is, but have doGet() report the number of different users and the number of accounts that they have created. (You may need to "instrument" the codethat is, add additional statementsto start counting such things.)

2.

Change BudgetPro to do its output on the fly instead of building the entire page before output. Can you notice any difference in the display time?

3.

Design error handling for BudgetPro to prevent the user from allocating more than is available in the (sub)account. Will you use Java exceptions? If so, which object will throw them and which will catch them? How will you inform the user of the error? Implement your design.



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net