What is the difference between JSP and Servlet?
Answer Posted / satyabrata
Both servlet and jsp are web components. But servlet is
best suited for request processing, handling the business
logic while jsp is suitable for content generating .Its
easy to include html tag in jsp rather than servlet.Also
jsp is compiled to servlet when first loaded to
webserver.So in many framework servlet act as a controller
while jsp as a view.Also implicit object and action
elements available in jsp but not in servlet.
| Is This Answer Correct ? | 103 Yes | 15 No |
Post New Answer View All Answers
What is the difference between jsp and thymeleaf?
How to include static files in a jsp?
What is the advantage of using getProperty action, as compared to the accessor method?
What happens when a page is statically included in another jsp page?
What is the jspinit() method?
How session is achieved in JSP?(once user logs out,if he press back button of browser he should not be allowed to same page)
How do I mix jsp and ssi #include? What is the difference between include directive & jsp:include action?
What are the implicit objects in jsp?
How to create menu in jsp with example?
Why is used in jsp?
What is the need for jsp?
What is jsp declaration?
How to find out the name of the http method using jsp el?
How to send data from one page to another in jsp?
What does jsp mean?