File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Servlets and JSP

parnini gavande
Greenhorn

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
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
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.
Bill

------------------
author of:
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Parnini:
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
 
wood burning stoves
 
subject: Servlets and JSP