What is the difference between JSP and Servlet?
Answer Posted / ranjan satapathy
Jsp is better for preparing presentation pages, while
servlet is good for request processing as it's more
difficult to write include, forward a static or dynamic url
with in out.println() ,
Jsp has also all implicit objects, we need not have to
instantiate any which is easier.
error handelling is easy in jsp isErrorPage="true"
errorPage="/page"
we need not have to bother about init(),service(),destroy
(),doGet(),doPost()in jsp.
in servlet for each time changing we have to explicitly
compile it.
Jsp automatically compiled by container when we reload the
page.
| Is This Answer Correct ? | 77 Yes | 11 No |
Post New Answer View All Answers
Why does _jspService() start with an ‘_’ but other lifecycle methods do not?
What are jsp declarations?
Can I run jsp on xampp?
What is jsp exception?
What are the components that make up a tag library in jsp?
Why do we use jstl tags?
What is page scope?
List out the various scope values of jsp action.
What are the different scope values for the jsp objects?
How does a servlet communicate with a jsp page?
Why is _jspservice() method starting with an '_' while other life cycle methods do not?
How can a thread safe JSP page be implemented?
Mention the advantages of jsp over pure servlets?
How many tags are provided by jstl?
What are jsp lifecycle methods?