Forums Register Login

Getting value stored in variable to browser using JSP

+Pie Number of slices to send: Send
Hello,

User when he entered plan "platinum"on jsp page...first servlet and finally DAOImplementation class gets called. Now the someAmountMoney1 variable will have the total investment amount i receive after 3 years. This I want to display it on JSP.

Could anyone provide me suggestion on how the value of variable in method can be called in JSP and display value stored in variable to user?

i have a condition implemented in method :
public boolean getOutManageInvestment(String accountID, String password,
double someAmountMoney, String plan) throws MyWebBankException {

..............
-----------
double interestrate;
if (plan.equalsIgnoreCase("PLATINUM"))
{
interestrate=0.70; double someAmountMoney1=0.0;
System.out.println("Amount you entered is"+someAmountMoney);
someAmountMoney1=(someAmountMoney+someAmountMoney*interestrate)*3;
System.out.println("Amount you receive after period of 3 years you will receive"+someAmountMoney1);
}
+Pie Number of slices to send: Send
Data to be used by JSPs is generally passed to it as a request attribute by a servlet.
What are your superhero powers? Go ahead and try them on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 604 times.
Similar Threads
Help with this mortgage calculation program
noob with a looping interest rate problem
Linked List question
Help! With the formatting of the percent!
Try-Catch block issues
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:45:15.