Ajp 6
Ajp 6
Servlet Marks-14
Unit Outcome-
1. Explain function of the given method servlet life cycle
2. Use relevant Generic servlet to develop given web based application
3. Use relevant HTTP servlet to develop specified web based application
4. Develop servlet for cookies and session tracking to implement the given
problem
Introduction to servlet
-Servlet Technology is used to create web applications.
-Servlet technology uses Java language to create web applications.
What is CGI
-CGI is actually an external application which is written by using any of the programming languages like C or C++
Disadvantages of CGI
There are many problems in CGI technology:
1.If the number of clients increases, it takes more time for sending the response.
2.For each request, it starts a process, and the web server is limited to start processes.
3.It uses platform dependent language e.g. C,C++
Advantages of Servlet
1.Better performance: because it creates a thread for each request, not process.
2.Portability: because it uses Java language.
3.Robust: JVM manages Servlets, so we don't need to worry about the memory leak, garbage collection, etc.
4.Secure: because it uses java language.
Difference between Servlet and CGI