actually i'm building a web application for that. one servlet is used to for calculation purpose of submitted form data and result retrieval to another jsp file. now i want to store the submitted form data and result in oracle database
Then write methods to do these steps. Servlets should not be used in place of methods. Servlets can share these methods if need be, but do not think of servlets as units of execution that should be called to do anything other than respond to a request.
how can we transfer the submitted form data from a jsp to get calculations done and that data to be stored in a a database . this two events should occur simulatniously. i've written programming for submitting form data to get calculations to be done. now i want the input data as well as the output data to be stored in database
So your JSP is generating HTML which includes this form, and after the user enters data into that form and clicks on the form's Submit button, you want something to process the submitted data? Then have the form submit to a servlet which does that processing.
If that processing includes doing some calculations and updating a database, then fine. Have the servlet do that, or call methods which do it, or whatever.
Paul Clapham wrote:If that processing includes doing some calculations and updating a database, then fine.
you are correct it includes some calculations and updating a database. i am able to this things get done separately but i want them to be done simultaneously. is it possible to do them using single servlet,if so how?. and if not? how to do it. please explain it.