waht is the main diference b/w servelts and JSP ?




Answers were Sorted based on User's Feedback



waht is the main diference b/w servelts and JSP ?..

Answer / vaibhav

The major difference is that JSP files are dynamically
compiled at the time of request whereas the servlets had to
be compiled before the server is started. Evrytime the file
is modified, it is to be compiled manually and the server
needs to be restarted. This does not happen in JSp where
files are automatically compiled at the time of request and
the server need not be restarted.

Is This Answer Correct ?    17 Yes 3 No

waht is the main diference b/w servelts and JSP ?..

Answer / anurag joseph

there are minor difference btw these two.Servlet is used
for processing afterall containter is servlet engine.It
perform many task like load balancing,request
processing,generating image on fly.But if we want to
responce an html format than this is not efficient.thats
why jsp is needed.jsp is java inside Html and servlet is
like html inside java.JSP is used for graphical user
interface. it focus upon presentation not business logic
and processing.

Is This Answer Correct ?    11 Yes 3 No

waht is the main diference b/w servelts and JSP ?..

Answer / shakir khan

In terms of creating a Grapical user interface,servlet is
tough to use.Because you have to write huge code to send
html text to client.This is automatically done for you,when
you write a JSP,Using its tags etc.You can check the
generated servlet and try to judge the code you didn't have
to write.

In servlet using OutputStream,we can send byte streamS like
images.or
We can use customized OutputStream and do whatever we can
with it.Whereas with JSP we can output only
characters.Since PrintWriter is character based.

The advantage of JSP is that they are documentric servlets
look and act like programs.

The power of jsp is that they are server based and provides
a framework for web based application.

JSP is a flat file that are translated at runtime in to a
servlet.JSP are useful for presentation oriented task such
as html rendering.

JSP are high level extension of servlet,it enable the
developer to embed java code in html pages.JSP pages are
finally complied in to a servlet.Complied servlet is used
by the engine to serve the request.

Is This Answer Correct ?    7 Yes 0 No




waht is the main diference b/w servelts and JSP ?..

Answer / ravindra nhavi

the main different is jsp only depend on HTTP protocol
but servlet support for HTTP,SMTP,FTP protocol

In jsp you directly embeded java code in to the html code
but is in servlet is not posible.

Is This Answer Correct ?    5 Yes 0 No

waht is the main diference b/w servelts and JSP ?..

Answer / nagababu

By using jsp we can seperate presentation logic from
bussinesslogic

By Using Servlets combine presentation logic and business
logic.

Is This Answer Correct ?    3 Yes 0 No

waht is the main diference b/w servelts and JSP ?..

Answer / surendra

Jsp is nothing but a servlet
By using jsp we can seperate presentation logic from
bussinesslogic
The report that generate to the enduser must be placed in
jsppage
All the database operations must be placed in a javabean
so that we can easily modify the application if required
To simplify the development of the application jsp is used
rather than servlets.

Is This Answer Correct ?    3 Yes 2 No

waht is the main diference b/w servelts and JSP ?..

Answer / amit kmar

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.

Is This Answer Correct ?    1 Yes 0 No

waht is the main diference b/w servelts and JSP ?..

Answer / adnan zaman

In servelts html code write with print.out statement every line it is not easy but in jsp html code simple and easy write jsp better then servlets

Is This Answer Correct ?    1 Yes 2 No

Post New Answer



More Servlets Interview Questions

What is http servlet?

0 Answers  


What are sessions in servlets?

0 Answers  


Write a command to get actual path of a servlet to the server?

0 Answers  


where the session data will stored?

4 Answers  


How multiple simultaneous requests can be handled by servlets?

2 Answers  






Explain load on start-up and its importance?

0 Answers  


What's the use of servletcontext?

0 Answers  


What are setSecure() and getSecure() methods in Cookies?

1 Answers  


What is forward() and include() of servlets RequestDispatcher interface?

6 Answers   HCL,


What is the default http method in the servlet?

0 Answers  


How an Image can be loaded in a Servlet ?

1 Answers  


What exactly is a servlet?

0 Answers  






Categories