Handling Http Request & Responses

Estudies4you

Handling Http Request & Responses 

  • doGet and doPost are the commonly used methods of HTTPServlet 
Get 
  • Its main job is to get some resource From server based on client request 
  • Total number of characters that get cancarry to server is very less/limited. 
  • This appends URL with client request data 
  • One can Cache the requests of this type 
  • Requests parameters remain in browsing history 
  • Because of above limitations, GET is not supposed to used for complex and sensitive requests 
Post
  • Its main job is to send client data and get the resource from server based on client request. 
  • Post can handle more characters that get can carry to server is very less/limited. 
  • This does not append client request data to URL 
  • These requests cannot be cached 
  • These do not remain in browsing history
  • This is more preferred for complex and sensitive requests (like login)
To Top