• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting value stored in variable to browser using JSP

 
pavithra murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
}
 
Kuldip Shetty
Ranch Hand
Posts: 45
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Data to be used by JSPs is generally passed to it as a request attribute by a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic