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 / tarun pundreek sharma
JSP is a server side technology given by sun microsystem after servlet technology. we have some drawback in servlet to overcome those drawback and also to attract programmers working on other domain the sun micro system introduce JSP.
Advantages of JSP:-
1: we need to re-compile our servlet for every single change in the source code of servlet , where as in the case of JSP re-compilation is not required since JSP are automatically handle by the web container for any update in their code.
2: servlet can not be access directly & have to be first mapped in the web.xml file.where as the jsp page access directly as a simple HTML page.
3: both servlet & jsp are server side components used to generate dynamic Html pages however JSP is preffered over servlet as it is developed by using a simple HTML template
& automatically handled by the JSP container.
4: JSP is a tag based approach it makes it easy to understand.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Difference between httpservlet and generic servlets?
What are different methods of session management in servlets?
How can we create deadlock situation in servlet?
Can you explain in detail 'javax.servlet' package?
How to commuincate between an applet and a servlet?
What are the exceptions thrown by servlets? Why?
What are the differences between the servletconfig interface and the servletcontext interface?
Describe servlet?
What is Servlet API used for connecting database?
What are sessions in servlets?
How servlets are deployed in java?
Write all the phases defined in servlet life cycle?
What is the difference between servlet and jsp?
What is the difference between the include() and forward() methods?
How native code can be used in a servlet?