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
How clear chache and buffer of opera browser.
Why do we need custom tags in jsp?
What is a jsp expression?
What is scripting elements in jsp?
What is difference between sendredirect and forward?
How many tags are provided by jstl?
How can the output of JSP or servlet page be prevented from being cached by the browser?
How can html output be prevented from being cached?
What does .com stand for?
What is session scope?
What is jsp include tag?
Why use of scripting elements in jsp is discouraged?
How to send data from jsp to jsp?
How are the jsp requests handled?
What do you know about writing custom jsp tags?