File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes difference bet servelet and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "difference bet servelet and jsp" Watch "difference bet servelet and jsp" New topic

difference bet servelet and jsp

mandadi vamsikrishna rao

Joined: Apr 12, 2004
Posts: 8
hai, can any one clarify what is the exact difference between servelet and jsp.
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
There is not much difference between JSPs and Servlets
We use JSPs for the presentation. We can embed HTML and also Javascript in JSP pages. And its quite difficult to present through Servlet. You will have to use a lot of out.print() commands in it.
JSPs ultimately converted into the servlets when we run the application.
Whereas Servlets are mostly used as a controller. (See MVC Pattern) For logic and not for presentation
Rajaguru Ramalingam

Joined: Apr 12, 2004
Posts: 11
The differences are
1) In Jsp, content generation and content presentation are easily readablity is easy But in Servlet..we need to embed the Html in java code which is difficult to understand.
2) Jsp gives Http protocol specific functionality only.But servlet may provide Protocol independent functionality that is , servlet may be a http servlet or generic servlet
3) Jsp is an extension of servlet.
I agree. Here's the link:
subject: difference bet servelet and jsp
It's not a secret anymore!