Hi Guest

HomePage

1 1

To improves our performance please Like Share Subscribe(Will boost us)

Define main difference in between JSP and Servlet?
Question Posted on 26 May 2022

Home >> Java >> JSP >> Define main difference in between JSP and Servlet?

Define main difference in between JSP and Servlet?
Below are main difference in between JSP and Servlet:-
0
0

Base of differenceServletsJSP
SpeedWhen we compare Servlets with JSP Servlets run faster than JSPBut when we say about JSP it is slower than Servlets as it will takes time to compile the program and convert into servlets.
Complexity Writing code in Servlet is very hard than JSPTo write code in JSP very easy then Servlets.
MVC architectureWhen we say about MVC architecture, Servlets works as a controller.JSP works as a view for displaying output when we say about MVC architecture.
Data ProcessingServlets is mainly used when there is more data processing is involved. We use JSp when there is no involvement of much data processing.
Custom TagWhen we say about custom tag writing there is no facility avaialble in Servlets.In JSP we can easily build custom tags that can directly call Java beans.
LanguageServlet is mainly a Java code.JSP is mainly HTML base code.
ProtocolServlets will accept all the protocols request including HTTP.On the other hand JSP will only accept HTTP request.
Service() MethodWe can override service() method in Servlet.In JSP we can not override the service() method.
Session ManagementWhen we say about session management in Servlet by default session is not enable and to enable this we need to do that explicitly.In JSP session management is enable automatically.
LogicIn Servlet we need to implement both business and presentation login in single file.In JSP business logic is split from presentation logic using JavaBeans.
ModificationModification in Servlet file is a time consuming due to recompiling, reloading, and restarting the server. JSP modification is fast, as you just need to click one refresh button.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions
Define main difference in between JSP and Servlet?
Write down some drawback of JSP?
Define some important JSP action tags?
How to use JSP in the MVC model?
Why Components not have add() and remove() methods but JComponent have?






Most Visited Questions
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |
     
 
Privacy policy | Terms and Conditions | Blog


If the copyright of any questions or content or syntax belong to you email us we will remove that(info@crackyourinterview.com or crackyourinterview2018@gmail.com)
 

1
Home About Us GroupChat
 
Sitemap Feedback Contact us