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 |
what is difference between redirect and forward method?
12 Answers Polaris, TCS, Wipro,
What is jsp expression language and what are it’s benefits?
what are the tools used in your project , How to ask the answer this question
Tell us about the stages (phases) of the jsp life cycle.
How many messaging models do jms provide for and what are they?
Explain jsp and tell its uses?
What is directive jsp?
what is jsp? a technology ,a language or something else ?
i need the source code for opening a word document in java
List out the various scope values of jsp action.
What is the _jspservice() method?
Which syntax is used to comment jsp?