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 to retrieve warnings?
How can I override the jspinit() method within a jsp page?
What are the possible values for language directive?
How can html output be prevented from being cached?
How to comment out jsp code?
Which tag is used to execute java source code in jsp?
What is a jsp page?
What is jsp custom tag and what are it’s components?
Which two interfaces does the javax servlet jsp package have?
What is jsp param?
What is meant by jsp?
What is asp and jsp?
What is difference between page and pagecontext in jsp?
Which implicit object is not available in normal jsp pages?
How does a jsp work?