how can i decide whether projects have to be done on servlets or jsps? what are the design patterns that is generally follwed while working on servlets?
Most web applications follow the MVC architechture. In this as a rule generally servlets form a part of the "Model" or "Controller" at times, while JSPs form a part of the "View".
So the project could use both, JSPs are to be used for presentation while servlets to do the server-side processing and handling of client requests.
The Servlets are used for Controller and JSPs are used for views in MVC model.Ultimately a JSP is also converted into Servlet.Most of the time the servlets are used when you have to write more Java code and less HTML code while JSPs are used when you have to write more HTML and less Java.In a project both JSPs and Servlets can be used.
There are very few questions that have been asked more than this one, both here and elsewhere. Type "Servlets vs JSPs" into the search field in either this forum or the Servlets form and you will find plenty of discussions.
Personally, I think the question is flawed. It's like asking about "Knife vs Plate". The two technologies are complimentary, and don't compete with one another.