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 / r b arumugam

Java Servlet is a Java File and is converted into .class
file. If there is any changes in Servlet we must compile
once again.
JSP is a HTML file and java coding is embedded into it. The
JSP page is automatically compiled. There is NO deplyment
descriptor file in JSP as web.xml

Servlet is fully java coding and JSP is a collection of
HTML,JSPtag,JSTL

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain web container.

569


How to find whether a parameter exists in the request object?

668


What is the difference between servlet and filter?

530


Elucidate servlet attributes and its scope?

569


Define servlet mapping?

660






What is the difference between the include() and forward() methods?

571


Explain how does JSP handle run-time exceptions?

582


Which application server is best for java?

560


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

567


What is a servlet context?

600


How to handle exceptions thrown by application with another servlet?

615


What is Servlet API used for connecting database?

620


Can we use threads in Servlets?

656


What is the difference between jsp and servlet life cycle?

689


How can the session in servlet can be destroyed?

712