Difference between JSP & servlets.

Difference between JSP & servlets.

Ques:- Difference between JSP & servlets.
1 870

2 Answers on this Question

  1. Servlets are faster as compared to JSP, as they have a short response time.
    JSP is slower than Servlets – JSP is a HTML-based codes.
    Servlets are harder to code, as here, the HTML codes are written in Java – JSPs are easier to code, as here Java is coded in HTML.
    In an MVC architecture, Servlets act as the controllers. – In MVC architectures, the JSPs act as a view to present the output to the users.
    The service() function can be overridden in Servlets. – The service() function cannot be overridden in JSPs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top