What is the difference between JSP and Servlet?
Answers were Sorted based on User's Feedback
Answer / joshua pathrose
The main difference is the servlet has to mapped in
WEB.xml(deployement descriptor) file ,whereas JSP does not.
2.It support only
Http. whereas servlet support FTP,Http etc
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / abhimanyu
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.jsp seprates
busigness Logic.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vignesh
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.Using servlet
as request processor and jsp as view we can achieve the mvc
architecture.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / birja kumar,chennai
Servlet are serverside applet.Servlet are loaded an executed by the webbrowser But JSP file contain traditional HTML along with embeded code that allow the developer to access data from the java code running on the server...........
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / veeresh n
Both jsp (java server pages) and servlets are web
components.
Jsp is best suitable for presenting the Content. Servlet is
best suitable for processing the request, so many frame
works use servlet as controller and jsp as view. Jsp has
implicit objects and action tags but servlets doesn't have
and implicit objects and action tags.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vaidegi
Jsp mainly used for the presentation only.It support only
Http. whereas servlet support FTP,Http etc
Is This Answer Correct ? | 25 Yes | 45 No |
Answer / shankar
servlet is java classes.
In servlet,clientside validation is possible.
servlet is html codes.
servlet is web components.
jsp stand for java server page.
jsp is not java classes.
In jsp,clientside validation is not possible.
jsp is html codes.
jsp is web components.
Is This Answer Correct ? | 9 Yes | 46 No |
Answer / shankar
servlet is not java classes.
In servlet,clientside validation is possible.
servlet is html codes.
servlet is web components.
jsp stand for java server page.
jsp is not java classes.
In jsp,clientside validation is not possible.
jsp is html codes.
jsp is web components.
Is This Answer Correct ? | 9 Yes | 83 No |
Answer / malay
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.
Is This Answer Correct ? | 38 Yes | 114 No |
How will you use jsp el in order to get the http method name?
Why is it not recommended to use script elements in jsp?
difference betwwn 16 bit and 32 bit
What is an api with example?
What are different implicit objects of jsp?
How to implement a thread-safe jsp page?
Explain about the Scriplet and Exclamatory Tag?
What is the include directive?
How are cookies set in jsp?
How jsp is executed by web server?
What is the different between servlet and struts
How did you implement caching in jsp?