• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Getting value stored in variable to browser using JSP

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
}
 
Ranch Hand
Posts: 45
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Data to be used by JSPs is generally passed to it as a request attribute by a servlet.
reply
    Bookmark Topic Watch Topic
  • New Topic