Display the properties of an arraylist object the


Language is JSP: Using JSP foreach tag, display the properties of an ArrayList object. The assignment is documented as attached. In 9-3.docx, #4-6 is what I am trying to complete.

I am having difficulty printing the values for each year. My attempts have just printed the object address, instead of the actual dollar amount.

1. Download, unzip and open the project named ch09_ex3_futureValue.

2. Open the FutureValueServlet class. Note that the code in the doPost method has beenmodified to create a list of calculation objects, one for each year starting at one and goingup to the number of years entered by the user. Also, note that it stores an attribute namedcalculations in the request.

Modify the code

3. Open the index.jsp file. Then, modify it so it uses the JSTL choose tags instead of JSTLif tags.

4. Open the result.jsp file. Then, modify it so it presents a table that displays the value ofthe investment for each year up to the year the user entered. To do this, you can use aJSTL forEach tag. When you're done, the user interface should look something like this:

102_Figure.jpg

5. Note that the Investment Amount, Yearly Interest Rate, and Number of Years fields are nolonger working correctly. This is because the application stores multiple calculationsinstead of a single calculation.

6. Fix the application so the second page displays the Investment Amount, Yearly InterestRate, and Number of Years fields again. There are several ways to do this. Choose theway that you think works best.

Attachment:- futureValue.rar

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Display the properties of an arraylist object the
Reference No:- TGS02386529

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)