Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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.
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic