• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A basic question

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hui Zhao,

First, please see:
http://faq.javaranch.com/java/UseAMeaningfulSubjectLine
"A basic question doesn't really describe this question very well".



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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic