Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
general knowledge
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
beans
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


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.


 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


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?






 
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 |