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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is the difference between jsp and servlet?
 Question Submitted By :: Sivasubramanian.k
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between jsp and servlet?
Answer
# 1
JSP are java server pages which constitute of html pages 
embedded in it ie it is useful for both presentation and 
application/business logic..It is compiled only once and 
each time it is not executed by server..While servlet are 
server side programs which are compiled  and is executed
each time..
 
Is This Answer Correct ?    2 Yes 2 No
Sivasubramanian.k
 
  Re: What is the difference between jsp and servlet?
Answer
# 2
jsp means java server page ,jsp is  laso a servelt .In the 
servlet code is written by manually but in jsp code is 
generated by the jsp container. 
jsp is used where the presentation layer is more, and  this 
is uesd in medium and larger projects
servlet is used in small projects

adv:
 1. jsp can be devolp easly.
 2. jsp will take less time.
disadv:
  1. it can accupi the more memory(why because it fallow 
structural procedure menas by genearting the servlet code 
included unnecessry content also)
 
Is This Answer Correct ?    0 Yes 1 No
Madhu Sudana Rao.yadavalli
 
 
 
  Re: What is the difference between jsp and servlet?
Answer
# 3
>Servlets are gud at running logic.
>not so gud at producing large amount of o/p.

>Not so gud at lots of logic.
>g8 ay producing lots of texual o/p.
 
Is This Answer Correct ?    2 Yes 1 No
Dimpu
 
  Re: What is the difference between jsp and servlet?
Answer
# 4
Jsp is defined as Java server pages. 
Jsp and servlet both are server side programming language. 
the diffence in b/w these two is Jsp is used for 
presentation part and servlet is use to give the business 
logic. 
Servlet act as redirector also. it redirect your page as 
per the business logic. 

anyhow Jsp are compiled to servlet but Jsp comes in to 
picture to separate out the presentation logic from the 
servlet to make it loosely coupled.
 
Is This Answer Correct ?    4 Yes 0 No
Namita
 
  Re: What is the difference between jsp and servlet?
Answer
# 5
Servlets and Java Server Pages are complementary APIs, both
providing a means for generating dynamic Web content. A
servlet is a Java class implementing the
javax.servlet.Servlet interface that runs within a Web or
application server's servlet engine, servicing client
requests forwarded to it through the server. A Java Server
Page is a slightly more complicated beast. JSP pages contain
a mixture of HTML, Java scripts (not to be confused with
JavaScript), JSP elements, and JSP directives. The elements
in a Java Server Page will generally be compiled by the JSP
engine into a servlet, but the JSP specification only
requires that the JSP page execution entity follow the
Servlet Protocol.

The advantage of Java Server Pages is that they are
document-centric. Servlets, on the other hand, look and act
like programs. A Java Server Page can contain Java program
fragments that instantiate and execute Java classes, but
these occur inside an HTML template file and are primarily
used to generate dynamic content. Some of the JSP
functionality can be achieved on the client, using
JavaScript. The power of JSP is that it is server-based and
provides a framework for Web application development. Rather
than choosing between servlets and Java Server Pages, you
will find that most non-trivial applications will want to
use a combination of JSP and servlets. In fact, the JSP 1.1
and Servlet 2.2 specifications are based around the concept
of the Web application, combining the two APIs into a
unified framework.
(http://www.devx.com/tips/Tip/25217)
 
Is This Answer Correct ?    0 Yes 1 No
Gabriela
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is polymorphism with example?types of polymorphism? HP6
What is the purpose of the File class?  2
1).Is Object class abstract or not? 2).Is main method(public static void main(String args[])low priority thread or high priority thread? TCS2
Difference between JDK, JRE, JVM Oracle5
what is Portal(web based online portal)? AIG1
what is bytecode? watz the difference between machine code and bytecode? Oracle4
What are the traverses in Binary Tree? Adobe2
why there are multiple catches for a try block.don't tell me that there can be multiple exception of a code segment that's why.tell me the real fact behind this.  4
what is the use of custom tags? with example? Photon1
What are teh sub-classes of a component class?  2
What is object  6
In which JDK version event-delegation model is introduced?  1
How to make a class immutable? Bosch6
what is main difference b/w abstract class and interface  3
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do? KPIT3
What is Transient and volatile iFlex9
write a simple program inheritance? Polaris2
What is meant by packages?  2
what is the Arraylist limit (maximum) by default ? Fidelity6
Difference between prefix and postfix forms of the ++operator?  2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
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