I'm facing a problem in fetching/passing calculated data from a bean. Actually I'm calculating some stuff in a bean, accessing that through a servlet and then displaying the calculated data using JSP/JSTL on the browser. Now there are 2 such bean classes which calculate separately and I want to access these two bean classes in another bean class and display the final result on the browser. It's something like this - say Bean class A does addition of 2 nos, Bean class B does subtraction of 2 other nos. Now Bean class C should fetch class A's sum, class B's subtraction and perform mutiplication on both these and display result on browser. This is easy if values are constant but the values here are being passed by user. Am using Prepared Statement(?) attribute to fetch data from user. So I cannot get the data again from the user and calculate the stuff.
How should I access calculated data of class A and class B without again writing a query or asking the user to enter values again or calculating again? Any possible way to get this? Kindly help, your help would be much appreciated !!! I'm struck with this.