what is the difference between Servlet and JSP?Advantage of
JSP over Servelt?Any concept present in JSP which we cant
implement in Servlet?

Answer Posted / naina verma

Difference between servlets and JSP:

1. Servlet = HTML in java code.
JSP = java code in HTML.

2. Servlet support all protocols.
JSP only support HTTP protocol.

3. Servlet has more Dynamic content and less Static.
JSP less Dynamic content and more static content.

4. Servlet has business logic.
JSP has presentation and business logic both.

5. In servlet for any modification recompilation is done.
In JSP no recompilation is done for any modification.

6. Servlet is fast.
JSP is Slow.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is servlet used?

775


What is difference between get and post method?

648


What is getservletcontext?

622


What is the capacity the doget can send to the server?

651


Which java framework is most popular?

656






What are the steps involved in placing a servlet within a package?

668


Is tomcat a servlet container?

654


What's the difference between authentication and authorization?

632


Explain the custom jsp tags and the beans.

689


How can you run a servlet program?

681


What's the difference between servlets and applets?

637


What do you mean by web applications? Explain web application directory arrangement?

622


Define context initialization parameters.

648


What do you mean by url pattern in servlet?

702


Explain request dispatcher and its methods.

668