why business logic written using servlets not in jsp. Jsp
used for presentation purpose. serlvet used for coding
business logic and controller logic. Reason for using
servlets in business logic.
Answer Posted / nishant
Actually the main reason behind this when the servlet is
used for both presentation & business logic, the tight
coupling between presentation & business logic creates the
problem to the reusablity, because sometime change in
business logic tends to change in presentation logic. Apart
from that the tags & HTML like enviroment makes the webpage
more dynamic.
Now if we are using jsp page for business logic then
scriptlet will be more inside the JSP page which leads to
heavy maintaince cost. The business techies call it as
MODEL1 Architecture.
The seperate declaration of servlet for business unit will
avoid all above.Say MODEL2 Architecture.
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify
Is servlet synchronized?
Difference between java beans & servlets?
Name the different ways of session tracking.
How do you run a servlet?
What do you mean by httpservlet and how it is different from the genericservlet?
How to create war file?
What is session tracking?
What are the types of protocols supported by httpservlet ?
What is session?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
What are the different ways we can maintain state between requests?
What are the differences between forward() method and sendredirect() methods?
Write a program to show the functionality of doget and dopost method?
Explain the difference between get and post method in servlet?