Why servlet is used as controller ? Not JSP? I want complete explation?
Answer / Mamta Maurya
Servlets are used as controllers in Java web applications because they provide a powerful and flexible way to handle HTTP requests and generate dynamic content. Unlike JSP, Servlets offer more control over the request-response lifecycle, allowing developers to implement business logic, manage state, and handle multiple requests concurrently using multithreading. Additionally, servlets can easily interact with other technologies such as databases or legacy systems.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the difference between HttpServlet and GenericServlets?
What is context switching?
What compiler do not do if we create our own constructor?
How many ways are available to ger RequestDispatcher object?
Explain the lifecycle of a servlet?
What are the annotations used in servlet 3?
How many ways to remove the session object in the container
How many Cookies can a host support?
How can the session in servlet be destroyed?
What are the uses of servlet and what is servlet chaining?
how the server will know its the same jsp page?
how the HTML data stored in web server?