CGI creates process for each client call where as servlet creates process for the first time and then uses thread for each client.
Chat with our AI personalities
JSP stands for JAVA SERVER PAGES, where as CGI stands for COMMON GATEWAY INTERFACE. In CGI, whenever a multiple requests of the same dynamic web page is made by the client to the server, a new process is cerated of the corrosponding CGI program, for each an every request generated as such.. this is not the case in JSP.. in JSP, when the first request is made for a dynamic web page..its corrosponding class file an hence the servlet is then cached in the memorey, and hence new threads are generated for the futher requests made, saving resources..
You cannot. HTML is a static file and it cannot interact with a Java Servlet. A Servlet can always redirect to a HTML page but the other way round cannot happen.
The difference is that a GenericServlet has no defined protocol (it is "generic"), while HttpServler uses the HTTP protocol. HttpServlet is a subclass of GenericServlet with the purpose of creating a servlet for a web site.
Applet: It is run on browser, i mean client side. Servlet: It is run on server, i mean server side.
A Servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web serversA Servlet is a Java-based server-side web technology.The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container.