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 / sarfaraz sheikh
difference between Servlet and JSP::
Servlet::
1) It is a controller which is used into appllication to
collect inputs from end user and pass them to service layer.
2) It is service provider between presentation layer and
service layer.
3)It has less execution time as compare to JSP.
4)It is used to desighn static and dynamic pages for GUI.
5) Servlet doesent has implecit objects but there is an
option to make explicit objects.
6) We can be embeded html or plan text with servlet classes.
7)It suport to http and others protocol.
JSP::
1) 1) It is not controller which is used into appllication
only purpose of desighning GUI.
2) It is service provider between presentation layer and
service layer.
3)It has less execution time as compare to JSP.
4)It is used to desighn static and dynamic pages for GUI.
5) Servlet doesent has implecit objects but there is an
option to make explicit objects.
6) We can be embeded html or plan text with servlet classes.
JSP::
1) 1) It is not controller which is used into appllication
only purpose of desighning GUI.
2) It is service provider between presentation layer and
service layer.
3)It has less execution time as compare to JSP.
4)It is used to desighn static and dynamic pages for GUI.
5) Servlet doesent has implecit objects but there is an
option to make explicit objects.
6) We can be embeded html or plan text with servlet classes.
JSP::
1) 1) It is not controller which is used into appllication
only purpose of desighning GUI.
2) It is not service provider between presentation layer and
service layer but it is component of presentation layer.
3)It has more execution time as compare to servlet.
4)It is used to desighn only dynamic pages for GUI.
5) JSP has implecit objects to implements jsp code.
6) JSP allow to embeded java code into predifined jsp tages.
7) JSP only suport to http protocol.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the methods of request dispatcher in servlet?
Which HTTP method is non-idempotent?
What is the main purpose of java servlets?
What is the purpose of dispatcherservlet properties?
What is the directory structure of web application?
Which java application server is the best?
how the HTML data stored in web server?
Name the packages that work with servlet?
What do you mean by interservlet communication?
What are the two important api's in for servlets?
How to handle exceptions thrown by application with another servlet?
Is servlet a controller?
How can you create a session in servlet?
What is session?
What is the difference between context parameter and context attribute?