Friday, May 23, 2008

JSP Servlet J2EE Questions 12

56. What is the difference between doPost and doGet methods?
a) doGet() method is used to get information, while doPost() method is used for posting information.
b) doGet() requests can’t send large amount of information and is limited to
240-255 characters. However, doPost()requests passes all of its data, of unlimited
length. c) A doGet() request is appended to the request URL in a query string and
this allows the exchange is visible to the client, whereas a doPost() request
passes directly over the socket connection as part of its HTTP request body and the
exchange are invisible to the client.

57. What is the life cycle of a servlet?- Each Servlet has the same life cycle:
a) A server loads and initializes the servlet by init () method. b) The servlet
handles zero or more client’s requests through service() method. c) The server
removes the servlet through destroy() method.

58. Who is loading the init() method of servlet?
Web server

59. What are the different servers available for developing and deploying Servlets?
a) Java Web Server b) JRun g) Apache Server h) Netscape Information
Server i) Web Logic

60. How many ways can we track client and what are they?
The servlet API provides two ways to track client state and they are: a) Using Session tracking and b) Using Cookies.

No comments:

Useful Information