• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP & Servlets

 
Shantanu Puranik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the Major difference between Servlet and JSP?
 
kamlesh tayade
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Servlet is java class which having HTML tag and JSP is HTML tags having java sentex.
As JSP is mostly used for presentation work by HTML and Servlet is used for defining the logics of the work and web application working.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kamlesh",

You have already received three warning to adjust your display name to adhere to JavaRanch standards. This is not optionla. Adjust your display name to be a first and a last name prior to your next post. Otherwise, your account will be closed.

bear
JavaRanch Sheriff
[ February 11, 2006: Message edited by: Bear Bibeault ]
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is tons of free information out there that will get you a very good understanding of these 2 technologies. You may want to search google.
 
Talha Bin Hussain
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

JSP is Java code embedded in HTML; the Java code is compiled (if necessary) and run by the container on the server and the client only sees the results of that code's execution mixed in appropriately with the html.

Servlets are compiled pure Java class files (not mixed with HTML) that get posts from the client and send html to in return.

but both reqiured container on the server, such as Tomcat.
 
krishna yadav
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

JSP technology extends the basic Servlet framework to enable easier and faster page authoring and maintenance in larger enterprises.

One difference between JSP and SERVLET is first time when we call jsp it will take time to respond , since server has to convert jsp to servlet and execute the component.
[ February 13, 2006: Message edited by: krishna yadav ]
 
Albin Joseph
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is mainly used for presentaion logic only. But servlet can handle business logic also.

The main difference between servlets and JSP is servlets can supprot any type of protocol like SMTP, FTP.. But JSP supports HTTP protocol only
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic