<%@ page import= "java.text.NumberFormat" %> <%@ page import= "java.util.Locale" %> <%@ page errorPage="../mainerror.jsp"%>

How much can I afford based on my current housing payment?

Enter Your Current Rent <%= payment %> > This could also be your current house payment.
Enter Amount of Down Payment You Have <%= down %> > If you have equity in your current home that would apply here.
Enter an Interest Rate <%= rate %> > Choose a current rate such as 6.75.
     
  <% payment = request.getParameter("payment"); down = request.getParameter("down"); rate = request.getParameter("rate"); %> <% if ( payment == null || down ==null || rate == null || payment.compareTo("") == 0 || down.compareTo("") == 0 || rate.compareTo("") == 0) { String msg = "Please enter a value for each entry"; %> <%= msg %> <% } else { int house = 0; Locale currentLocale; currentLocale = new Locale("en", "us"); NumberFormat currencyFormatter; currencyFormatter = NumberFormat.getCurrencyInstance(currentLocale); house = mortgageBeanId.calculateHouseValue(payment,down,rate); String currencyOut = currencyFormatter.format(house); %> <%= currencyOut %> <% } %>   This is the price of a home that you could afford to buy right now.