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
What is contextpath?
Tell us about the jsp life cycle methods.
What is session object in jsp?
What is the use of jsp implicit objects?
What is < jsp:forward> tag for?
How can we disable el?
Explain client-side and server-side validation.
Why are jsp pages preferred for creating web-based client program?
Explain pge Directives.
What are the implicit, internal objects and methods on the jsp page?
What is the difference between include and jsp directive: include action?
How can I set a cookie and delete a cookie from within a jsp page?
What is content type in jsp?
What are the scopes available in
Explain various implicit objects in expression language.