answersLogoWhite

0


Best Answer

A temporary servlet is started when a request arrives and shut down after the response is generated. A permanent servlet is loaded when the server is started and lives until the server is shut down.

* This is useful when startup costs are high, such as a servlet that establishes a connection to a database.

* Also useful for permanent serverside service, such as an RMI server.

* Provides faster response to client requests when this is crucial. Being temporary or permanent is part of the server configuration.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between temporary servlet and permanent servlet?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between HTTP servlet and Generic servlet?

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.


What is the difference between networking and servlet in java?

Networking is a basic action. A servlet in Java is a single part of networking, a single task.


What is the difference between servletcontext and servletconfig?

ServletContext Defines a set of methods that a servlet uses to communicate with its servlet container.ServletConfig is a servlet configuration object used by a servlet container used to pass information to a servlet during initialization. All of its initialization parameters can ONLY be set in deployment descriptor.The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized.You can specify param-value pairs for ServletContext object in tags in web.xml file.The ServletConfig parameters are specified for a particular servlet and are unknown to other servlets. The ServletContext parameters are specified for an entire application outside of any particular servlet and are available to all the servlets within that application.By Santanu


What is the difference between requestgetattribute and requestgetParameter in JSP?

request.getAttribute() is used on the Server side Java code to get values submitted from the form onto the Servlet or other java classes request.getParameter() is used on the JSP page to get values sent by the servlet and display it in the jsp page


What is difference between single threaded servlet and multi threaded servlet?

The single thread model means that your servlet would not be multi-threaded. If there are two concurrent requests to your servlet then 2 instances of your servlet will be created to process these 2 requests. You can implement the single thread model by implementing the SingleThreadModel interface in your class. This is just a marker interface and does not have any methods. The multi threaded model means that your servlet would be multi-threaded and only one instance would exist. Multiple concurrent requests would be served by the same instance but in different threads. You can implement the multi threaded model by not implementing the SingleThreadModel interface in your servlet class.


What is the difference between RequestDispatcher.forward and HttpServletResponse.sendRedirect?

In send Redirect whenever the client makes any request it goes to the container, there the container decides whether the concerned servlet can handle the request or not. If not then the servlet decides that the request can be handle by other servlet or jsp. Then the servlet calls the sendRedirect() method of the response object and sends back the response to the browser along with the status code. Then the browser sees the status code and look for that servlet which can now handle the request. Again the browser makes a new request, but with the name of that servlet which can now handle the request and the result will be displayed to you by the browser. In all this process the client is unaware of the processing.


What are types of servlet?

Http servlet and Generic servlet


How do you give connection between HTML and java servlet?

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.


Differniate between applet and servlet in java?

Applet: It is run on browser, i mean client side. Servlet: It is run on server, i mean server side.


What is java servlet chaining?

Servlet Chaining means the output of one servlet act as a input to another servlet. Servlet Aliasing allows us to invoke more than one servlet in sequence when the URL is opened with a common servlet alias. The output from first Servlet is sent as input to other Servlet and so on. The Output from the last Servlet is sent back to the browser. The entire process is called Servlet Chaining.


Differences between cgi and servlet?

CGI creates process for each client call where as servlet creates process for the first time and then uses thread for each client.


What is difference between GET and POST in servlets in java?

The difference between a GET and a POST is the way data is transferred to a servlet. With a GET, the URL will show each name/value pair on the query string in the URL. For example, if you had a form with a field named 'foo,' and when submitted had a value of 'bar,' the URL might be something like this: http://www.example.com/servlet?foo=bar With a POST, this information is not visible in the URL. Instead, it is transferred in the HTTP headers. As far as the actual servlet is concerned, there is not a great deal of difference when it comes to getting the parameters. Whether you use a GET or a POST, you still use request.getParameter("foo"); to get the value. The method used in the Servlet for processing either a GET or a POST is different too. If you use a GET, the method that is called is doGet(HttpServletRequest, HttpServletResponse). The doGet method is also called if there is no GET or POST data. If you use a POST, the method called is doPost(HttpServletRequest, HttpServletResponse).