This is the source code of the Tax Calculator JSP file:
<%@ page language="java" %> <html> <head><title>Tax Calculator</title></head> <body bgcolor="#c8e3ff"> <form action="tax.jsp" method="POST" > <table border="0" cellspacing="5" cellpadding="5" > <colgroup> <col width="20%"/> <col width="80%"/> </colgroup> <% org.example.tax.web.TaxUIController controller= new org.example.tax.web.TaxUIController(); controller.setIncome(request.getParameter("income")); %> <tr> <td>Income:</td> <td> <input name="income" value="<%= controller.formatIncome() %>" type="text" size="30" maxlength="40"> </td> </tr> <tr> <td>Tax:</td> <td> <%= controller.formatTax() %> </td> </tr> </table> <table border="0" cellspacing="5" cellpadding="5"> <colgroup> <col width="30%"/> <col width="40%"/> <col width="30%"/> </colgroup> <tr> <td></td> <td><input type="submit" value="calculate tax" ></td> <td></td> </tr> </table> </form> </body> </html> |