• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpServletRequest Objects

 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell me what is the life cycle of HttpServletRequest object ? When it is created ?. when it is destroyed and when it is retained ?
 
Mahesh swami
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpServletRequest object is created when the container calls the service method. COntainer wraps the request in this type of object. This object is destroyed whenservice method for the called servlet ends.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The extremely important implication of what Mahesh said is that you must NEVER try to keep a request object past the end of a single request/response cycle. Managing request objects is the servlet engine's job.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!