Why use servlet? Since we can establish the interaction with stream socket between client and server.So what is the purpose of servlet? Is stream socket not enough founctioned?
We use servlets because they're a higher level abstraction than sockets. By leveraging the work of those who came before us, we are able to focus more clearly on the task at hand (web developement) and not on low level details of TCP/IP, the OSI layer's, the finer details of the HTTP protocol.