What is difference between Servlet & JSP?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

A Servlet is a Java class which extends the capabilities of servers that hosts the applications that are accessed using a model called request-response model. More importantly, servlets are used to extend the applications that are hosted by the web servers, and they can also respond to other types of...
read more
A Servlet is a Java class which extends the capabilities of servers that hosts the applications that are accessed using a model called request-response model. More importantly, servlets are used to extend the applications that are hosted by the web servers, and they can also respond to other types of requests too. For these type of applications, HTTP-specific servlet classes are defined by JAVA Servlet technology. Difference between Servlet and JSP Servlet JSP Servlet is Java Code JSP is HTML Code Writing code here is harder compared to JSP JSP is easier to code than Servlet as it is Java in HTML It plays the role of a controller in MVC Approach JSP is just the view in MVC Approach for showing output. It is faster than JSP JSP is slower than Servlet as the first step in its lifecycle is the translation of JSP to java code and then compile. It can accept all protocol requests It can only accept HTTP Requests We can override the service() method. We cannot override its service() method. The default session management is not enabled, user have to enable it explicitly. JSP session management is automatically enabled. We have to implement everything from a business logic and presentation logic in just one servlet file. JSP business logic is separated from presentation logic by using JavaBeans. It is a time-consuming task because it includes reloading, recompiling and restarting the server. Modification is faster, need to click the refresh button. read less
Comments

Related Questions

Is it good to go for a Java coaching center and learn Java (with advanced Java) to improve my programming skills?
yes, Please check the Institute reviews and discuss with the tutor, what topics were covered in class. Ask about the practicals session and how many hours/duration of the course.
Gerda
0 0
5
Which is a good Java training and placement institute for a fresher in Bangalore?
I know an institute in HYderabad which is giving 100% job guarantee or 100% fee refund. They have office in bangalore also, not sure whether they are offering this program in Bangalore. Please visit their...
Raja
0 0
5
Is it possible to learn java at home without coaching in one month?
It all depends on you. If you are already aware of programming then it is definetly possible to learn java at home. But if learn through a tutor then you can learn easily.
Pritom
0 0
5
What is the general syllabus covered in core Java training from any institution?
Welcome Course Overview Review of Java Fundamentals The Java Environment Data Types The String Class The StringBuffer Class Arrays Passing Data Types to a Method Constructors &...
Shiv Kohli
0 0
5
How do I learn Java? From book or internet or a coaching?
According to me....u should start from basic Java..that is core Java... . Find coaching , who teaches Java for beginners.....then later u can go for advance java.
Suresh
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java : Compile-time Versus Runtime optimization
While designing and development, one should think in terms of compile-time and run-time.It helps in understanding language basics in a better way.Let's understand this with a question below : What...
S

How can everyone prepare to clear any Java interview?
Java interview your java should be much strong then J2EE. core java and Advance java is the basic foundation for Interview. Some of the topic about which you should know before going for a java interview...

Mastering in Java Programming
Core java topics What is Java?Execution Model Of JavaBytecodeHow to Get Java?A First Java ProgramCompiling and Interpreting ApplicationsThe JDK Directory StructureUsing Eclipse Data types and Variables What...

Recommended Articles

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you