Exforsys

Free Training

JSP and Servlet

This is a discussion on JSP and Servlet within the Java forums, part of the Programming Talk category; I have started my reading of Java. I want to know the difference between JSP and servlet. Someone give me ...

Go Back   Exforsys > Programming Talk > Java

Exforsys.com

  #1 (permalink)  
Old 12-12-2006, 03:18 AM
Senior Member
 
Join Date: Apr 2006
Posts: 162
sammy is on a distinguished road
JSP and Servlet

I have started my reading of Java. I want to know the difference between JSP and servlet. Someone give me a idea on this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-21-2006, 05:55 AM
Junior Member
 
Join Date: Aug 2006
Posts: 5
gpraveen_mca is on a distinguished road
JSP's are simply the html pages with some Java code encapsulated in special tags used to generate HTML dynamically. These are mainly used to render HTML using Java.

Servlet's are java classes where the business logic will be kept. These are mainly useful for processing the request.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-23-2006, 02:58 PM
Senior Member
 
Join Date: Apr 2006
Posts: 162
sammy is on a distinguished road
Friend does it mean that they are two seperate containers placed in a single bag of technology.Correct me if I have understood wrongly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-26-2007, 04:08 AM
adeepak's Avatar
Junior Member
 
Join Date: Jul 2006
Location: Pune
Posts: 5
adeepak is on a distinguished road
JSP is an extension of servlet technology. JSPs help you create web pages easily by integrating the JSP code within..
As stated above servlet is a pure Java class..
What happens behind the scenes is that the JSP is converted to a normal servlet which is then evaluated, with an output as a static HTML
__________________
techdeep.in
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-24-2007, 07:09 AM
Junior Member
 
Join Date: Sep 2007
Posts: 3
singhsn is on a distinguished road
servlets are HTML code embedded in java code.
jsp is java code embedded in HTML code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-02-2007, 11:30 AM
Junior Member
 
Join Date: Nov 2007
Posts: 8
vickyas400 is on a distinguished road
Differences between servlet and jsp

Servlet is a simple java class that is loaded dynamically and run in a special container called the Servlet Engine / container

Jsp is a simple language which helps to seperate the request processing and business logic from the presentation. JSP is actually compiled to servlets

People prefer JSP because Servlets
- require detailed java programming knowledge
- changing the look and feel of the page requires servlet code to be updated and recompiled. .. its not required in JSP . compiled automatically by the container which checks for the time stamp of the class in the container when every request arrives.
- addressing JSP pages is simpler compared to servlets.
- pages are HTML like - has greater compatibility with web dev tools.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-05-2007, 11:41 PM
Junior Member
 
Join Date: Jun 2007
Posts: 6
jyothi423 is on a distinguished road
hi

-->hi JSP is mainly intended for Developers who doesnt require any JAVA knowledge and just they can use Markups /Tags just like using HTML .
Servlets are programs wirtten in Java language .
JSP page when compiled , it coverts into Servlet ofcourse .The JSP container(Runtime environment for JSP) takes care of this conversion .
-->JSP is best choice for View Design
and servlets are best choice for acting as controller .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-06-2007, 02:21 AM
Junior Member
 
Join Date: Nov 2007
Posts: 1
salmanarafath is on a distinguished road
Quote:
Originally Posted by sammy View Post
I have started my reading of Java. I want to know the difference between JSP and servlet. Someone give me a idea on this.
Hi i am salman : if u want to code in java if code requires lot of processing then u should use servlets.If code requires user interface then u should use JSP.note that u can write lot of processing and gui in servlets alone but JSP is good for gui based applications .Eventually every JSP at end of the day will become servlet.
The other difference is that Servlet is nothing but HTML /xml code embedded in java where as JSP is java code embedded in html/xml.

for other quries u cant contact me on cell my number is 9989906865
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.