*
The moose likes JSP and the fly likes servlet vs jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "servlet vs jsp" Watch "servlet vs jsp" New topic
Author

servlet vs jsp

vara prasad
Ranch Hand

Joined: Dec 21, 2004
Posts: 47
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?
Vishal Pai
Greenhorn

Joined: Mar 02, 2002
Posts: 16
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.


Regards,<br />Vishal
Ajnam Bujanany
Greenhorn

Joined: Jan 27, 2005
Posts: 3
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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
 
subject: servlet vs jsp