What is difference between JSP and Servlet?

1. JSP is a HTML-based code1. Servlet is a java code
2. It is easier to code in JSP2. It is hard to write code in servlet
3. It runs slower than servlet3. It runs faster than JSP
4. In MVC architecture, JSP works as a view.4. In MVC architecture, Servlet works as a controller.
5. It can accept all protocol requests, including HTTP5. It can only accept HTTP request
6. In JSP, you can't override the service() method6. In Servlet, You can override the service() method
7. In JSP, session management is enabled7. In Servlet, session management is not enabled
8. In JSP, Java code is written inside the HTML code.8. In Servlet, HTML code is written inside the Java code.