September 23, 2009 at 2:27 PM
JSP and Servlets both are the server side components which can respond to the client request.But JSP is a scripting language flexible for web designers to use the tags with java language. It is basically used for presentation.
In Servlet, the request and response object is passed onto different servlets with little task completed by each servlet. This controlling part is easier to write in java.As Servlet contains the pure java code and coding is needed to generate the proper user response. So Servlet is needed.