Servlet should contain bussiness logic and Jsp should contain presentation logic in MVC architecture. Why?
A Servlet can take an HTTP request from a web browser, generate the request dynamically and then send a response containing an HTML or XML document to the browser. It means you can write business as well as presentation logic is Servlet. But there is a drawback in this approach which is, if Web page designers wanted to change the appearance of the page, they'd have to edit and recompile the servlet. With this approach, generating pages with dynamic content still requires some application development experience. Clearly the servlet request-handling logic needs to be separated from the page presentation. Model-View-Controller (MVC) provides a solution.With MVC, the back-end system is your Model, the templates for creating the look and feel of the response is the View and the code that glues it all together is the Controller. JSPs fit perfectly into this solution as a way of creating a dynamic response or View. Servlets containing logic for managing requests act as the Controller, while your existing business rules are the Model.
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. This is the major reason. 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 maintenance cost.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.