- write a jsp page to get the information from user in a html form
- send the request to your servlet upon submit click
- call some handler, could be a plain java class, to extract all the data and fill your TO (Transfer Object)
- pass your transfer object to your business logic object that would calculate the tax for you
- after all these done, send the result jsp page to browser
For simple example please refer to The courtesy of Ben Souther
Originally posted by Donna Bachner:
Thank You I think that helps me out. I didn't know which came first the JSP or the servlet.
Actually JSP and Servlets both serves different purpose. But can be used in place of eachother. But we know the right tool to knock the work down. JSP is used for presentation stuff, whereas Servlet is used as a controller. Thus, I have given you the link to command pattern for clear understanding.
It is not the matter of choose either one. We can utitlize both technologies to get our work done in a nice way and to come up with a better cleaner design.
please help me out
I think you'll find that this whole project will move more quickly, and be more satisfying, if you step back from it a bit and take some time to learn about the fundamentals of a servlet app.
There are lots of good tutorials out there.
Tomcat has one right on their site:
I also think that people learning servlets are better off if they don't rely on an IDE to organize their first few apps.
If you code, compile, and deploy your first "Hello, World" app with javac and a standalone instance of Tomcat, you will understand the file structure of a webapp and have a much better time debugging them when things go wrong later. Once you feel comfortable working with these small apps, then see if an IDE can speed things up for you.
Originally posted by Srirambhatla dileep kumar:
how to set the path to make my tomcat run on my system..
please help me out
You had better start new thread for your question.