What is difference between servlets and java server pages?
SERVLETS
JSP
1. Servlet is a java class.
2. Servlet is a single instance multiple thread web application,
In which HTML code can be included in java code.
3. In servlets the presentation logic and the B.logic is tightly
coupled.
4. For every modification done in servlet program, we need to
recompile and reload the application.
5. In servlets implicit objects are not available.
6. Servlets are supported to HTTP, FTP, and SMTP protocols.
7. Sevlets are need Deployment Descriptor file (web.xml)
1. Jsp is a file.
2. In jsp java code can be included in HTML code by using
special tags.
3. In jsp's the presentation logic and B.logic are separated by
defining the java beans.
4. If any modifications done in jsp's without recompiling and
reloading , the modifications are reflected.
5. In jsp's implicit objects are available which is we can
implement directly into jsp pages.
6. Jsp are supported to HTTP protocol only.
7. No need of Deployment Descriptor file (web.xml)
rajus_1219@yahoo.co.in