Posts

Showing posts with the label networks

Life cycle of Servlet

Image
Life cycle of Servlet :- The life cycle of a servlet can be categorized into four parts: 1.      Loading and Inatantiation:  The servlet container loads the servlet during startup or when the first request is made. The loading of the servlet depends on the attribute of web.xml file. If the attribute has a positive value then the servlet is load with loading of the container otherwise it load when the first request comes for service. After loading of the servlet, the container creates the instances of the servlet.

Difference between TCP and UDP

TCP UDP Reliability : TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message. Reliability : UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message. Ordered : If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order. Ordered : If you send two messages out, you don't know what order they'll arrive in i.e. no ordered Heavyweight : - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequen...