ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 


 

Company >> T3 Softwares >> Interview Questions >> JSP Interview Questions
 
  Human Resources Interview Questions (2)   Marketing Sales Interview Questions (7)   AI Fuzzy Logic Interview Questions (1)
  CRM General Interview Questions (1)   HR Questions Interview Questions (3)   Web Related AllOther Interview Questions (1)
  XML XSLT RSS Interview Questions (1)   Servlets Interview Questions (1)   Core Java Interview Questions (2)
  Apache Interview Questions (1)   Dot Net AllOther Interview Questions (2)   Ajax Interview Questions (1)
  JSP Interview Questions (1)   PHP Interview Questions (5)
 
Back to Questions Page
Question   What is the difference between JSP and Servlet? Rank Answer Posted By  
 Interview Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Jsp is better for preparing presentation pages, while 
servlet is good for request processing as it's more 
difficult to write include, forward a static or dynamic url 
with in out.println() ,

Jsp has also all implicit objects, we need not have to 
instantiate any which is easier.

error handelling is easy in jsp isErrorPage="true" 
errorPage="/page"

we need not have to bother about init(),service(),destroy
(),doGet(),doPost()in jsp.

in servlet for each time changing we have to explicitly 
compile it.

Jsp automatically compiled by container when we reload the 
page.
 
0 Ranjan Satapathy
 
 
Answer
Servlets are pure java programs.here we can't use HTML.
But in JSP we use HTML,so we can use and modify the data 
very easily.
   Servlets are faster than JSP.bcoz while running JSP 
programs it will be converted into Servlets and then 
executed,so it takes more time.
 
0 Pratheeka Reddy
 
 
Answer
Servlets are pure java codes,here we can't used HTML.
But in JSP we can use HTML,so we can modify and also 
updated the data.
Another difference In Servlet  clientside validation is 
possible But in jsp clientside validation is not possible.
 
0 Malay
 
 
 
Answer
Both servlet and jsp are web components. But servlet is 
best suited for request processing, handling the business 
logic while jsp is suitable for content generating .Its 
easy to include html tag in jsp rather than servlet.Also 
jsp is compiled to servlet when first loaded to 
webserver.So in many framework servlet act as a controller 
while jsp as a view.Also implicit object and action 
elements available in jsp but not in servlet.
 
2 Satyabrata
 
 
Answer
Jsp mainly used for the presentation only.It support only 
Http. whereas servlet support FTP,Http etc
 
1 Vaidegi
 
 
Answer
1-The most important difference is that whenever we do some
changes in a servlet we need to build the application
completely but no need to do the same in case of jsp....
 
0 Xxxxxx
 
 
Answer
A servlet and jsp's both are equal ,there could many 
differences in that mainly one difference is a jsp's code 
will internally convert to an servlet internally.

 Also the person who use jsp's no need to know java 
completely.
 
0 Y Ramakrishna
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com