Example & Tutorial understanding programming in easy ways.

What is the difference between jsp and servlet?.

Some important difference between jsp and servlet are listed below...

                                               JSP                                                     Servlet
JSP is a webpage scripting language that can generate dynamic content.

JSP run slower compared to Servlet as it takes compilation time to convert into Java Servlets.

Itís easier to code in JSP than in Java Servlets.

In MVC, jsp act as a view.

JSP are generally preferred when there is not much processing of data required.

The advantage of JSP programming over servlets is that we can build custom tags which can directly call Java beans

We can achieve functionality of JSP at client side by running JavaScript at client side.

 Servlets are Java programs that are already compiled which also creates dynamic web content.
Servlets run faster compared to JSP.


Its little much code to write here.


In MVC, servlet act as a controller.


servlets are best for use when there is more processing and manipulation involved.


There is no such custom tag facility in servlets.


There are no such methods for servlets.

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!