This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

HttpServletRequest Objects

 
pioneer
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 ?
 
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.
 
Author and all-around good cowpoke
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
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!