Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Servlets and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and JSP" Watch "Servlets and JSP" New topic

Servlets and JSP

parnini gavande

Joined: Mar 31, 2001
Posts: 5
I have just started learning servlets
I want to know the difference between Servlets And JSP
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Java Server Pages are just another way of creating a servlet, using a mixture of HTML and specialized tags. The idea with JSP is to insulate the designer of HTML pages from the nitty-gritty details of servlet programming.

author of:
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
As William stated, JSPs are (preferably) used to display dynamic content on your browser while Servlets are used to control the flow in a Web site, while communicating with other components (like EJBs) to gather data to be displayed later by the JSPs.
Technically, JSPs are compiled into Java Servlets and at the moment of execution they are indistinguishable from regular servlets by the Servlet Container.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: Servlets and JSP
It's not a secret anymore!